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

Issue 2642643002: Remove CallWith=ScriptState from window/self/frames getters on Window.

Created:
3 years, 11 months ago by dcheng
Modified:
3 years, 11 months ago
Reviewers:
haraken, Yuki
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove CallWith=ScriptState from window/self/frames getters on Window. Remote contexts won't have an associated ScriptState, so this needs to be plumbed through using a mechanism that doesn't depend on ScriptState. BUG=527190

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -14 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ToV8.h View 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ToV8.cpp View 2 chunks +10 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.h View 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h View 3 chunks +6 lines, -1 line 2 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 3 chunks +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 4 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Window.idl View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
dcheng
This is definitely a hack, but it's needed to unblock the remote context CL to ...
3 years, 11 months ago (2017-01-18 07:02:00 UTC) #4
Yuki
I'd prefer (partially) reverting my CL (https://crrev.com/2501333002) to landing this hacky CL if it works ...
3 years, 11 months ago (2017-01-18 07:31:43 UTC) #5
dcheng
On 2017/01/18 07:31:43, Yuki wrote: > I'd prefer (partially) reverting my CL (https://crrev.com/2501333002) to landing ...
3 years, 11 months ago (2017-01-18 07:48:14 UTC) #6
Yuki
On 2017/01/18 07:48:14, dcheng wrote: > On 2017/01/18 07:31:43, Yuki wrote: > > I'd prefer ...
3 years, 11 months ago (2017-01-18 08:08:27 UTC) #9
dcheng
3 years, 11 months ago (2017-01-18 08:26:50 UTC) #10
On 2017/01/18 08:08:27, Yuki wrote:
> On 2017/01/18 07:48:14, dcheng wrote:
> > On 2017/01/18 07:31:43, Yuki wrote:
> > > I'd prefer (partially) reverting my CL (https://crrev.com/2501333002) to
> > landing
> > > this hacky CL if it works for remote frames.  I'll come up with another
way
> > > without using ScriptState later.
> > 
> > I wasn't sure if this would be OK. But if this is considered an OK
> alternative,
> > I would be OK with that. By partial revert, do you mean reverting just the
> > non-test changes?
> 
> Yes, I meant non-test changes (or least changes).  If we can keep some
> improvements in testing, that's better.
> 
> My original change was a kind of silent changes, and I assume there shouldn't
be
> a big client or many clients on this (since it's been broken for a long time).

> So I think a partial revert wouldn't cause a big break.
> 
> 
> >
>
https://codereview.chromium.org/2642643002/diff/1/third_party/WebKit/Source/b...
> > > third_party/WebKit/Source/bindings/core/v8/ToV8.cpp:50:
> > ->globalIfNotDetached();
> > > I think globalIfNotDetached() is not equivalent to
> > > scriptState->context()->Global() because globalIfNotDetached() returns an
> > empty
> > > handle for some cases.
> > 
> > It's not completely equivalent, as it turns out, but for slightly different
> > reasons. Since windowProxy() always initializes, there will always be a
global
> > proxy object--it won't return an empty handle. However, there are a few test
> > expectations that start failing, which is what made me nervous about landing
> the
> > other CL. But since this CL has similar issues... it's probaby easiest to
> > investigate and figure out the right way to address in a followup.
> 
> If the page navigated away, then it's considered as detached and it returns
the
> empty handle, right?  scriptState->context()->Global() returns the global
proxy
> object even after the page navigated away.

With PS1 of this CL, I actually expected more tests to fail (like
property-access-in-closure-after-navigation-child.html, because
*LocalWindowProxyManager::windowProxy* should not initialize the WindowProxy)
but for some reason they are still passing. Very mysterious...

Powered by Google App Engine
This is Rietveld 408576698