summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/messaging_bindings.cc
diff options
context:
space:
mode:
authornednguyen <nednguyen@google.com>2015-09-10 16:08:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-10 23:09:19 +0000
commit0e66d57071b66863773249452c49384cff83b9ac (patch)
treeb9b11cf509d8344c1dd38f9f094551eb4520b70e /extensions/renderer/messaging_bindings.cc
parentf2aedcc017d906abfd2e9d567cf63c11f4d096e4 (diff)
downloadchromium_src-0e66d57071b66863773249452c49384cff83b9ac.zip
chromium_src-0e66d57071b66863773249452c49384cff83b9ac.tar.gz
chromium_src-0e66d57071b66863773249452c49384cff83b9ac.tar.bz2
Revert of Check the tab ID before delivering an extension message. (patchset #4 id:60001 of https://codereview.chromium.org/1318153002/ )
Reason for revert: Speculative revert, this may cause compile failure on [precise32, precise64] stable BUG=530347 Original issue's description: > Check the tab ID before delivering an extension message. > > r335753 changed extension messaging to use RenderFrames, which had the > side-effect of delivering messages to every RenderFrame in a process, > which may include other tabs. > > This patch fixes that by sending the target tab ID along with the message. A > more principled fix would have been to track RenderFrames on the browser and > send to precisely the right ones, but this would need to be part of a more > comprehensive refactor. > > I also fixed up ExtensionApiTest.Connect and re-enabled, which was disabled > years ago due to flakiness. Hopefully my test JS changes will fix that. > > BUG=520303 > R=rdevlin.cronin@chromium.org, dcheng@chromium.org > > Committed: https://crrev.com/1344c7dfde448d4b80693f597b02993b7f6bbd5b > Cr-Commit-Position: refs/heads/master@{#346176} TBR=dcheng@chromium.org,rdevlin.cronin@chromium.org,kalman@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=520303 Review URL: https://codereview.chromium.org/1339463002 Cr-Commit-Position: refs/heads/master@{#348274}
Diffstat (limited to 'extensions/renderer/messaging_bindings.cc')
-rw-r--r--extensions/renderer/messaging_bindings.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc
index 777f24f..1e0f6e2 100644
--- a/extensions/renderer/messaging_bindings.cc
+++ b/extensions/renderer/messaging_bindings.cc
@@ -25,7 +25,6 @@
#include "extensions/common/manifest_handlers/externally_connectable.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/event_bindings.h"
-#include "extensions/renderer/extension_frame_helper.h"
#include "extensions/renderer/gc_callback.h"
#include "extensions/renderer/object_backed_native_handler.h"
#include "extensions/renderer/script_context.h"
@@ -292,15 +291,6 @@ void DispatchOnConnectToScriptContext(
if (info.target_frame_id > 0 &&
renderframe->GetRoutingID() != info.target_frame_id)
return;
-
- // Bandaid fix for crbug.com/520303.
- // TODO(rdevlin.cronin): Fix this properly by routing messages to the correct
- // RenderFrame from the browser (same with |target_frame_id| in fact).
- if (info.target_tab_id != -1 &&
- info.target_tab_id != ExtensionFrameHelper::Get(renderframe)->tab_id()) {
- return;
- }
-
v8::Isolate* isolate = script_context->isolate();
v8::HandleScope handle_scope(isolate);