Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 708713003: Don't crash when granting permissions to active tab. (Closed)

Created:
6 years, 1 month ago by msimonides
Modified:
6 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/8747c1d912e10bbb8fe746ff6a06bb5a3d067efc Cr-Commit-Position: refs/heads/master@{#304784}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Change ExtensionMsg_*TabSpecificPermissions to ROUTED messages #

Total comments: 1

Patch Set 3 : Change for with iterators to a foreach. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -114 lines) Patch
M chrome/browser/extensions/active_tab_permission_granter.cc View 1 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h View 1 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc View 1 2 chunks +0 lines, -47 lines 0 comments Download
M extensions/common/extension_messages.h View 1 1 chunk +8 lines, -10 lines 0 comments Download
M extensions/renderer/dispatcher.h View 1 2 chunks +0 lines, -7 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 4 chunks +0 lines, -19 lines 0 comments Download
M extensions/renderer/dispatcher_delegate.h View 1 1 chunk +0 lines, -18 lines 0 comments Download
M extensions/renderer/extension_helper.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M extensions/renderer/extension_helper.cc View 1 2 3 chunks +37 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
msimonides
6 years, 1 month ago (2014-11-06 10:11:57 UTC) #2
msimonides
Adding kalman to reviewers, he seems to be the original author of OnUpdateTabSpecificPermissions in Dispatcher ...
6 years, 1 month ago (2014-11-12 14:32:55 UTC) #4
not at google - send to devlin
https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc File chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc (right): https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc#newcode313 chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc:313: // For now, the message should only be sent ...
6 years, 1 month ago (2014-11-12 16:28:09 UTC) #5
msimonides
https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc File chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc (right): https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc#newcode313 chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc:313: // For now, the message should only be sent ...
6 years, 1 month ago (2014-11-13 17:13:20 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc File chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc (right): https://codereview.chromium.org/708713003/diff/1/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc#newcode313 chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc:313: // For now, the message should only be sent ...
6 years, 1 month ago (2014-11-13 18:17:38 UTC) #7
msimonides
6 years, 1 month ago (2014-11-14 08:51:19 UTC) #9
palmer
IPC security LGTM.
6 years, 1 month ago (2014-11-14 19:14:12 UTC) #10
msimonides
ping!
6 years, 1 month ago (2014-11-18 07:10:18 UTC) #11
not at google - send to devlin
lgtm, this patch is awesome. https://codereview.chromium.org/708713003/diff/20001/extensions/renderer/extension_helper.cc File extensions/renderer/extension_helper.cc (right): https://codereview.chromium.org/708713003/diff/20001/extensions/renderer/extension_helper.cc#newcode297 extensions/renderer/extension_helper.cc:297: for (std::vector<std::string>::const_iterator it = ...
6 years, 1 month ago (2014-11-18 15:44:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/708713003/40001
6 years, 1 month ago (2014-11-19 07:52:19 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 1 month ago (2014-11-19 08:32:38 UTC) #15
commit-bot: I haz the power
6 years, 1 month ago (2014-11-19 08:33:36 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8747c1d912e10bbb8fe746ff6a06bb5a3d067efc
Cr-Commit-Position: refs/heads/master@{#304784}

Powered by Google App Engine
This is Rietveld 408576698