Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
index a6e1f06b7c4e9be4b635e4ae76709e528b0dc690..b4256a8940509a96cb8a326347b8ee9f307a2a7b 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
@@ -217,7 +217,7 @@ void V8Window::postMessageMethodCustom( |
LocalDOMWindow* source = CurrentDOMWindow(info.GetIsolate()); |
DCHECK(window); |
- UseCounter::Count(window->GetFrame(), UseCounter::kWindowPostMessage); |
+ UseCounter::Count(source->GetFrame(), UseCounter::kWindowPostMessage); |
// If called directly by WebCore we don't have a calling context. |
if (!source) { |
@@ -318,7 +318,7 @@ void V8Window::namedPropertyGetterCustom( |
// https://html.spec.whatwg.org/multipage/browsers.html#document-tree-child-browsing-context-name-property-set |
Frame* child = frame->Tree().ScopedChild(name); |
if (child) { |
- UseCounter::Count(window->GetFrame(), |
+ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), |
haraken
2017/05/15 03:40:45
This will work as expected because CurrentExecutio
dcheng
2017/05/15 04:04:02
I'm not sure I follow: I don't think CurrentExecut
haraken
2017/05/15 04:45:45
CurrentExecutionContext() returns nullptr for a re
dcheng
2017/05/15 04:57:30
Right, but CurrentExecutionContext() gets it from
|
UseCounter::kNamedAccessOnWindow_ChildBrowsingContext); |
// step 3. Remove each browsing context from childBrowsingContexts whose |
@@ -332,7 +332,7 @@ void V8Window::namedPropertyGetterCustom( |
} |
UseCounter::Count( |
- window->GetFrame(), |
+ CurrentExecutionContext(info.GetIsolate()), |
haraken
2017/05/15 03:40:45
Ditto.
|
UseCounter:: |
kNamedAccessOnWindow_ChildBrowsingContext_CrossOriginNameMismatch); |
// In addition to the above spec'ed case, we return the child window |