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

Issue 2654623007: [Extensions] Handle null ScriptContexts in GetModuleSystem() (Closed)

Created:
3 years, 11 months ago by Devlin
Modified:
3 years, 10 months ago
Reviewers:
nasko, dcheng
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, jochen (gone - plz use gerrit)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Handle null ScriptContexts in GetModuleSystem() GetModuleSystem() returns an object associated with a different JS context for testing purposes (and is also one of the "why do we even have that lever"-type things that we'd like to get rid of, but that's a separate issue). Without site isolation, embedded frames (even those from non-accessible contexts) are all hosted within the same process, and we can retrieve a ScriptContext for an embedded frame. With site isolation, this isn't necessarily true - there may be no corresponding script context for an embedded frame (when the frame is hosted in another process). In both cases, we should never return an object that is inaccessible to the current context, and so a null context is perfectly valid. Handle this in GetModuleSystem() and add a general comment above the GetContextByV8Object() method in ScriptContextSet. Fixes ExtensionBindingsApiTest.ModuleSystem for PlzNavigate + SitePerProcess BUG=674734 Review-Url: https://codereview.chromium.org/2654623007 Cr-Commit-Position: refs/heads/master@{#447149} Committed: https://chromium.googlesource.com/chromium/src/+/78d31a9fd4f364abc61bf19cbd8e7f6d10209c2a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M extensions/renderer/script_context_set.h View 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/renderer/v8_context_native_handler.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (11 generated)
Devlin
As promised. :)
3 years, 11 months ago (2017-01-25 20:25:32 UTC) #6
nasko
I'd defer to dcheng@ on this one, since it isn't an area I'm comfortable with.
3 years, 11 months ago (2017-01-25 20:45:56 UTC) #10
Devlin
On 2017/01/25 20:45:56, nasko wrote: > I'd defer to dcheng@ on this one, since it ...
3 years, 10 months ago (2017-01-27 20:13:43 UTC) #11
dcheng
On 2017/01/27 20:13:43, Devlin (catching up) wrote: > On 2017/01/25 20:45:56, nasko wrote: > > ...
3 years, 10 months ago (2017-01-27 20:18:20 UTC) #12
Devlin
On 2017/01/27 20:18:20, dcheng wrote: > On 2017/01/27 20:13:43, Devlin (catching up) wrote: > > ...
3 years, 10 months ago (2017-01-27 20:40:26 UTC) #13
dcheng
On 2017/01/27 20:40:26, Devlin (catching up) wrote: > On 2017/01/27 20:18:20, dcheng wrote: > > ...
3 years, 10 months ago (2017-01-27 21:00:34 UTC) #14
Devlin
On 2017/01/27 21:00:34, dcheng wrote: > On 2017/01/27 20:40:26, Devlin (catching up) wrote: > > ...
3 years, 10 months ago (2017-01-27 21:48:56 UTC) #15
dcheng
On 2017/01/27 21:48:56, Devlin wrote: > On 2017/01/27 21:00:34, dcheng wrote: > > On 2017/01/27 ...
3 years, 10 months ago (2017-01-30 23:54:11 UTC) #16
Devlin
On 2017/01/30 23:54:11, dcheng wrote: > Out of curiosity... WebFrame::canAccessFrame() feels like a hack. Could ...
3 years, 10 months ago (2017-01-31 00:11:10 UTC) #17
Devlin
On 2017/01/31 00:11:10, Devlin wrote: > On 2017/01/30 23:54:11, dcheng wrote: > > Out of ...
3 years, 10 months ago (2017-01-31 00:11:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2654623007/1
3 years, 10 months ago (2017-01-31 00:11:56 UTC) #20
commit-bot: I haz the power
3 years, 10 months ago (2017-01-31 01:14:12 UTC) #23
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/78d31a9fd4f364abc61bf19cbd8e...

Powered by Google App Engine
This is Rietveld 408576698