diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-07-10 09:03:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-10 16:03:46 +0000 |
commit | f01734ae15fc5c2a39181b25999683d336109dbf (patch) | |
tree | 9304f0d02aed195af8b540d7946ea885dc9a5acd /extensions/renderer/extension_frame_helper.cc | |
parent | ac899ca82a52961b7c3f162b1014a3c31341748c (diff) | |
download | chromium_src-f01734ae15fc5c2a39181b25999683d336109dbf.zip chromium_src-f01734ae15fc5c2a39181b25999683d336109dbf.tar.gz chromium_src-f01734ae15fc5c2a39181b25999683d336109dbf.tar.bz2 |
[Extensions] Fix improper extension tab ownership bug
An extension can "own" a tab if it owns the main frame, and
we block content scripts in this case. But there was a race
that meant the tab wasn't being updated in time for document_start.
Instead of informing the tab of its owner across IPC, use the
security origin of the top frame, since this can now be
accessed from remote frames as well.
BUG=507461
Review URL: https://codereview.chromium.org/1225413002
Cr-Commit-Position: refs/heads/master@{#338300}
Diffstat (limited to 'extensions/renderer/extension_frame_helper.cc')
-rw-r--r-- | extensions/renderer/extension_frame_helper.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc index bc54caa..394d07b 100644 --- a/extensions/renderer/extension_frame_helper.cc +++ b/extensions/renderer/extension_frame_helper.cc @@ -138,8 +138,6 @@ bool ExtensionFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ExtensionMsg_SetTabId, OnExtensionSetTabId) IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId, OnUpdateBrowserWindowId) - IPC_MESSAGE_HANDLER(ExtensionMsg_SetMainFrameExtensionOwner, - OnSetMainFrameExtensionOwner) IPC_MESSAGE_HANDLER(ExtensionMsg_NotifyRenderViewType, OnNotifyRendererViewType) IPC_MESSAGE_HANDLER(ExtensionMsg_Response, OnExtensionResponse) @@ -190,11 +188,6 @@ void ExtensionFrameHelper::OnUpdateBrowserWindowId(int browser_window_id) { browser_window_id_ = browser_window_id; } -void ExtensionFrameHelper::OnSetMainFrameExtensionOwner( - const std::string& extension_id) { - tab_extension_owner_id_ = extension_id; -} - void ExtensionFrameHelper::OnNotifyRendererViewType(ViewType type) { // TODO(devlin): It'd be really nice to be able to // DCHECK_EQ(VIEW_TYPE_INVALID, view_type_) here. |