Index: Source/bindings/core/v8/custom/V8WindowCustom.cpp |
diff --git a/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
index b0a945f5f24a56d81d984a29cc6ba46b2ab83294..2e31a7c35eafbedb9d9607464953244f8fb9ab76 100644 |
--- a/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
+++ b/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
@@ -247,7 +247,7 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
LocalDOMWindow* source = callingDOMWindow(info.GetIsolate()); |
ASSERT(window); |
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->document(), UseCounter::WindowPostMessage); |
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->frame(), UseCounter::WindowPostMessage); |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", "Window", info.Holder(), info.GetIsolate()); |
@@ -270,7 +270,7 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
if (info.Length() > 2) { |
int transferablesArgIndex = 2; |
if (isLegacyTargetOriginDesignation(info[2])) { |
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->document(), UseCounter::WindowPostMessageWithLegacyTargetOriginArgument); |
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->frame(), UseCounter::WindowPostMessageWithLegacyTargetOriginArgument); |
targetOriginArgIndex = 2; |
transferablesArgIndex = 1; |
} |