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

Issue 1293673002: Create thread-safe RendererExtensionRegistry from ExtensionSet (Closed)

Created:
5 years, 4 months ago by annekao
Modified:
5 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create thread-safe RendererExtensionRegistry from ExtensionSet The worker thread needs to be able to access the set of current extensions in order to associate a v8::context with an extension. BUG=501569 Committed: https://crrev.com/6572d5c749800cc81808e7628e11202fd40fc4f2 Cr-Commit-Position: refs/heads/master@{#344244}

Patch Set 1 : #

Total comments: 3

Patch Set 2 : #

Total comments: 22

Patch Set 3 : #

Total comments: 15

Patch Set 4 : #

Total comments: 10

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -134 lines) Patch
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 10 chunks +21 lines, -20 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/resource_request_policy.h View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/resource_request_policy.cc View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M extensions/extensions.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/dispatcher.h View 1 2 3 4 5 4 chunks +1 line, -15 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 1 2 3 4 5 6 17 chunks +29 lines, -22 lines 0 comments Download
M extensions/renderer/extension_injection_host.h View 1 2 2 chunks +2 lines, -5 lines 0 comments Download
M extensions/renderer/extension_injection_host.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M extensions/renderer/gc_callback_unittest.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
A extensions/renderer/renderer_extension_registry.h View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download
A extensions/renderer/renderer_extension_registry.cc View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
M extensions/renderer/script_context.h View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M extensions/renderer/script_context.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M extensions/renderer/script_context_set.h View 1 2 3 chunks +1 line, -5 lines 0 comments Download
M extensions/renderer/script_context_set.cc View 1 2 4 chunks +9 lines, -7 lines 0 comments Download
M extensions/renderer/script_context_set_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M extensions/renderer/script_injection_manager.h View 1 2 3 3 chunks +2 lines, -6 lines 0 comments Download
M extensions/renderer/script_injection_manager.cc View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M extensions/renderer/user_script_set.h View 1 2 3 3 chunks +1 line, -5 lines 0 comments Download
M extensions/renderer/user_script_set.cc View 1 2 4 chunks +5 lines, -6 lines 0 comments Download
M extensions/renderer/user_script_set_manager.h View 1 2 3 chunks +1 line, -5 lines 0 comments Download
M extensions/renderer/user_script_set_manager.cc View 1 2 3 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 43 (14 generated)
annekao
5 years, 4 months ago (2015-08-13 22:29:06 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/1293673002/diff/20001/extensions/common/extension_set.cc File extensions/common/extension_set.cc (right): https://codereview.chromium.org/1293673002/diff/20001/extensions/common/extension_set.cc#newcode47 extensions/common/extension_set.cc:47: base::AutoLock auto_lock(runtime_lock_); I think we'll need the lock over ...
5 years, 4 months ago (2015-08-13 23:33:56 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/1293673002/diff/20001/extensions/renderer/dispatcher.cc File extensions/renderer/dispatcher.cc (right): https://codereview.chromium.org/1293673002/diff/20001/extensions/renderer/dispatcher.cc#newcode123 extensions/renderer/dispatcher.cc:123: LAZY_INSTANCE_INITIALIZER; > g_instance method I mean g_instance variable.
5 years, 4 months ago (2015-08-13 23:34:31 UTC) #6
annekao
On 2015/08/13 23:33:56, kalman wrote: > https://codereview.chromium.org/1293673002/diff/20001/extensions/renderer/dispatcher.cc#newcode123 > extensions/renderer/dispatcher.cc:123: LAZY_INSTANCE_INITIALIZER; > If we're doing this, ...
5 years, 4 months ago (2015-08-13 23:40:26 UTC) #7
not at google - send to devlin
On 2015/08/13 23:40:26, annekao wrote: > On 2015/08/13 23:33:56, kalman wrote: > > > https://codereview.chromium.org/1293673002/diff/20001/extensions/renderer/dispatcher.cc#newcode123 ...
5 years, 4 months ago (2015-08-14 16:22:25 UTC) #8
Devlin
On 2015/08/14 16:22:25, kalman wrote: > On 2015/08/13 23:40:26, annekao wrote: > > On 2015/08/13 ...
5 years, 4 months ago (2015-08-14 16:32:01 UTC) #9
not at google - send to devlin
On 2015/08/14 16:32:01, Devlin wrote: > On 2015/08/14 16:22:25, kalman wrote: > > On 2015/08/13 ...
5 years, 4 months ago (2015-08-14 16:37:25 UTC) #10
Devlin
On 2015/08/14 16:37:25, kalman wrote: > Yeah it's a shame to need to make the ...
5 years, 4 months ago (2015-08-14 16:45:11 UTC) #11
not at google - send to devlin
> I think this is actually pretty easy. Short-term fix is just to make a ...
5 years, 4 months ago (2015-08-14 17:18:01 UTC) #12
not at google - send to devlin
I had a thought: I do think we should have some kind of "thread safe ...
5 years, 4 months ago (2015-08-14 17:35:27 UTC) #13
Devlin
On 2015/08/14 17:18:01, kalman wrote: > > I think this is actually pretty easy. Short-term ...
5 years, 4 months ago (2015-08-14 18:21:04 UTC) #14
Devlin
On 2015/08/14 17:35:27, kalman wrote: > I had a thought: I do think we should ...
5 years, 4 months ago (2015-08-14 18:22:41 UTC) #15
annekao
On 2015/08/14 18:21:04, Devlin wrote: > On 2015/08/14 17:18:01, kalman wrote: > > > I ...
5 years, 4 months ago (2015-08-14 23:41:07 UTC) #16
Devlin
On 2015/08/14 23:41:07, annekao wrote: > Should the RendererExtensionSet have a function to return its' ...
5 years, 4 months ago (2015-08-15 00:06:57 UTC) #17
annekao
Added RendererExtensionRegistry. Also changed any files that used dispatcher->extensions() to use GetRegistry().
5 years, 4 months ago (2015-08-17 20:05:02 UTC) #20
not at google - send to devlin
https://codereview.chromium.org/1293673002/diff/80001/extensions/renderer/dispatcher.cc File extensions/renderer/dispatcher.cc (right): https://codereview.chromium.org/1293673002/diff/80001/extensions/renderer/dispatcher.cc#newcode206 extensions/renderer/dispatcher.cc:206: RendererExtensionRegistry::GetRegistry()->GetMainThreadExtensionSet(), It's dangerous to be sending in a thread-unsafe ...
5 years, 4 months ago (2015-08-17 20:43:05 UTC) #21
annekao
Had to take out ExtensionSet from the constructor of a lot of classes. Also removed ...
5 years, 4 months ago (2015-08-17 23:51:11 UTC) #25
Devlin
https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc File extensions/renderer/renderer_extension_registry.cc (right): https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc#newcode8 extensions/renderer/renderer_extension_registry.cc:8: #include "base/stl_util.h" ? https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc#newcode9 extensions/renderer/renderer_extension_registry.cc:9: #include "extensions/common/constants.h" ? https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc#newcode10 ...
5 years, 4 months ago (2015-08-18 15:40:55 UTC) #26
annekao
https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc File extensions/renderer/renderer_extension_registry.cc (right): https://codereview.chromium.org/1293673002/diff/160001/extensions/renderer/renderer_extension_registry.cc#newcode8 extensions/renderer/renderer_extension_registry.cc:8: #include "base/stl_util.h" On 2015/08/18 15:40:55, Devlin wrote: > ? ...
5 years, 4 months ago (2015-08-18 17:43:31 UTC) #27
not at google - send to devlin
lgtm for my perspective. Wait for Devlin's additional lg as well, of course. https://codereview.chromium.org/1293673002/diff/180001/chrome/renderer/chrome_content_renderer_client.cc File ...
5 years, 4 months ago (2015-08-18 18:42:50 UTC) #28
not at google - send to devlin
... that is, lgtm once my comments have been addressed, but they're pretty simple.
5 years, 4 months ago (2015-08-18 18:43:03 UTC) #29
annekao
https://codereview.chromium.org/1293673002/diff/180001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1293673002/diff/180001/chrome/renderer/chrome_content_renderer_client.cc#newcode1243 chrome/renderer/chrome_content_renderer_client.cc:1243: *(extensions->GetMainThreadExtensionSet()), url); On 2015/08/18 18:42:49, kalman wrote: > *extensions->GetMainThreadExtensionSet() ...
5 years, 4 months ago (2015-08-18 20:21:13 UTC) #30
Devlin
lgtm with nits. https://codereview.chromium.org/1293673002/diff/200001/extensions/renderer/renderer_extension_registry.h File extensions/renderer/renderer_extension_registry.h (right): https://codereview.chromium.org/1293673002/diff/200001/extensions/renderer/renderer_extension_registry.h#newcode8 extensions/renderer/renderer_extension_registry.h:8: #include <iterator> not needed. https://codereview.chromium.org/1293673002/diff/200001/extensions/renderer/renderer_extension_registry.h#newcode12 extensions/renderer/renderer_extension_registry.h:12: ...
5 years, 4 months ago (2015-08-18 20:26:40 UTC) #31
annekao
thestig@, please take a look at the changes in chrome/renderer/ ExtensionSet is replaced with RendererExtensionRegistry ...
5 years, 4 months ago (2015-08-18 20:44:02 UTC) #33
Lei Zhang
non-extensions bits lgtm https://codereview.chromium.org/1293673002/diff/240001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1293673002/diff/240001/chrome/renderer/chrome_content_renderer_client.cc#newcode1238 chrome/renderer/chrome_content_renderer_client.cc:1238: const extensions::RendererExtensionRegistry* extensions = This variable ...
5 years, 4 months ago (2015-08-18 21:51:37 UTC) #35
annekao
https://codereview.chromium.org/1293673002/diff/240001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1293673002/diff/240001/chrome/renderer/chrome_content_renderer_client.cc#newcode1238 chrome/renderer/chrome_content_renderer_client.cc:1238: const extensions::RendererExtensionRegistry* extensions = On 2015/08/18 21:51:37, Lei Zhang ...
5 years, 4 months ago (2015-08-19 16:08:20 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293673002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293673002/300001
5 years, 4 months ago (2015-08-19 16:08:45 UTC) #41
commit-bot: I haz the power
Committed patchset #7 (id:300001)
5 years, 4 months ago (2015-08-19 16:13:43 UTC) #42
commit-bot: I haz the power
5 years, 4 months ago (2015-08-19 16:14:30 UTC) #43
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6572d5c749800cc81808e7628e11202fd40fc4f2
Cr-Commit-Position: refs/heads/master@{#344244}

Powered by Google App Engine
This is Rietveld 408576698