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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp

Issue 1419313003: Track the script state a listener was created in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp
index 8e54a33563ea3144b1433010ebc013bd89658866..0f54f05ca23db280e784802a823c87b0aa2c9c8b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp
@@ -51,8 +51,9 @@ void V8MessageChannel::constructorCustom(const v8::FunctionCallbackInfo<v8::Valu
// Create references from the MessageChannel wrapper to the two
// MessagePort wrappers to make sure that the MessagePort wrappers
// stay alive as long as the MessageChannel wrapper is around.
- V8HiddenValue::setHiddenValue(info.GetIsolate(), wrapper, V8HiddenValue::port1(info.GetIsolate()), toV8(channel->port1(), info.Holder(), info.GetIsolate()));
- V8HiddenValue::setHiddenValue(info.GetIsolate(), wrapper, V8HiddenValue::port2(info.GetIsolate()), toV8(channel->port2(), info.Holder(), info.GetIsolate()));
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ V8HiddenValue::setHiddenValue(scriptState, wrapper, V8HiddenValue::port1(info.GetIsolate()), toV8(channel->port1(), info.Holder(), info.GetIsolate()));
+ V8HiddenValue::setHiddenValue(scriptState, wrapper, V8HiddenValue::port2(info.GetIsolate()), toV8(channel->port2(), info.Holder(), info.GetIsolate()));
v8SetReturnValue(info, V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), channel, &wrapperTypeInfo, wrapper));
}

Powered by Google App Engine
This is Rietveld 408576698