summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_messages.h
diff options
context:
space:
mode:
authormsimonides <msimonides@opera.com>2014-11-19 00:32:29 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-19 08:33:02 +0000
commit8747c1d912e10bbb8fe746ff6a06bb5a3d067efc (patch)
tree06c040e38da3200387004c8ab1b17e0b082709ed /extensions/common/extension_messages.h
parenta3d924feb1bd3e3e2dab6ba85786db63334e8312 (diff)
downloadchromium_src-8747c1d912e10bbb8fe746ff6a06bb5a3d067efc.zip
chromium_src-8747c1d912e10bbb8fe746ff6a06bb5a3d067efc.tar.gz
chromium_src-8747c1d912e10bbb8fe746ff6a06bb5a3d067efc.tar.bz2
Don't crash when granting permissions to active tab.
It seems unlikely for active tab permissions to be granted to a tab that is closing but on the other hand there is nothing that would prevent a race condition in which the RenderView is destroyed before the ExtensionMsg_UpdateTabSpecificPermissions message is processed. The ExtensionMsg_{Update,Clear}TabSpecificPermissions message is changed to a ROUTED message so that it is sent to the specific RenderView directly. This removes the need to find the RenderView by tab_id which could fail. BUG=396232 Review URL: https://codereview.chromium.org/708713003 Cr-Commit-Position: refs/heads/master@{#304784}
Diffstat (limited to 'extensions/common/extension_messages.h')
-rw-r--r--extensions/common/extension_messages.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index 45160b6..526b6ec 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -441,17 +441,15 @@ IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId,
IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdatePermissions,
ExtensionMsg_UpdatePermissions_Params)
-// Tell the renderer about new tab-specific permissions for an extension.
-IPC_MESSAGE_CONTROL4(ExtensionMsg_UpdateTabSpecificPermissions,
- GURL /* url */,
- int /* tab_id */,
- std::string /* extension_id */,
- extensions::URLPatternSet /* hosts */)
+// Tell the render view about new tab-specific permissions for an extension.
+IPC_MESSAGE_ROUTED3(ExtensionMsg_UpdateTabSpecificPermissions,
+ GURL /* url */,
+ std::string /* extension_id */,
+ extensions::URLPatternSet /* hosts */)
-// Tell the renderer to clear tab-specific permissions for some extensions.
-IPC_MESSAGE_CONTROL2(ExtensionMsg_ClearTabSpecificPermissions,
- int /* tab_id */,
- std::vector<std::string> /* extension_ids */)
+// Tell the render view to clear tab-specific permissions for some extensions.
+IPC_MESSAGE_ROUTED1(ExtensionMsg_ClearTabSpecificPermissions,
+ std::vector<std::string> /* extension_ids */)
// Tell the renderer which type this view is.
IPC_MESSAGE_ROUTED1(ExtensionMsg_NotifyRenderViewType,