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 bf00ad2f1470477e52ea16e9177e47f4ba5fe191..1b6c76773dc97f82b92b200d24793c0d01309dc4 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageChannelCustom.cpp |
@@ -31,8 +31,8 @@ |
#include "bindings/core/v8/V8MessageChannel.h" |
#include "bindings/core/v8/V8Binding.h" |
-#include "bindings/core/v8/V8HiddenValue.h" |
#include "bindings/core/v8/V8MessagePort.h" |
+#include "bindings/core/v8/V8PrivateProperty.h" |
#include "core/dom/MessageChannel.h" |
#include "core/workers/WorkerGlobalScope.h" |
#include "wtf/RefPtr.h" |
@@ -41,8 +41,9 @@ namespace blink { |
void V8MessageChannel::constructorCustom( |
const v8::FunctionCallbackInfo<v8::Value>& info) { |
- ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
+ v8::Isolate* isolate = info.GetIsolate(); |
+ ExecutionContext* context = currentExecutionContext(isolate); |
MessageChannel* channel = MessageChannel::create(context); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -50,17 +51,15 @@ void V8MessageChannel::constructorCustom( |
// 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. |
- 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())); |
+ V8PrivateProperty::getMessageChannelPort1(isolate).set( |
+ isolate->GetCurrentContext(), wrapper, |
+ ToV8(channel->port1(), wrapper, isolate)); |
+ V8PrivateProperty::getMessageChannelPort2(isolate).set( |
+ isolate->GetCurrentContext(), wrapper, |
+ ToV8(channel->port2(), wrapper, isolate)); |
- v8SetReturnValue(info, |
- V8DOMWrapper::associateObjectWithWrapper( |
- info.GetIsolate(), channel, &wrapperTypeInfo, wrapper)); |
+ v8SetReturnValue(info, V8DOMWrapper::associateObjectWithWrapper( |
+ isolate, channel, &wrapperTypeInfo, wrapper)); |
} |
} // namespace blink |