Index: Source/core/dom/MessagePort.cpp |
diff --git a/Source/core/dom/MessagePort.cpp b/Source/core/dom/MessagePort.cpp |
index 46b53945e60a5e66b66a90cbbb99b8b99db19088..db87675b99b054252d2685251d01f6becd96f0af 100644 |
--- a/Source/core/dom/MessagePort.cpp |
+++ b/Source/core/dom/MessagePort.cpp |
@@ -266,4 +266,20 @@ DEFINE_TRACE(MessagePort) |
EventTargetWithInlineData::trace(visitor); |
} |
+v8::Isolate* MessagePort::scriptIsolate() |
+{ |
+ ASSERT(executionContext()); |
+ return toIsolate(executionContext()); |
+} |
+ |
+v8::Handle<v8::Context> MessagePort::scriptContextForMessageConversion() |
+{ |
+ ASSERT(executionContext()); |
+ if (!m_scriptStateForConversion) { |
+ v8::Isolate* isolate = scriptIsolate(); |
+ m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolate), DOMWrapperWorld::create(isolate)); |
haraken
2015/02/25 18:40:33
You need to call:
m_scriptStateForConversion->d
Marijn Kruisselbrink
2015/02/25 18:45:09
Done.
|
+ } |
+ return m_scriptStateForConversion->context(); |
+} |
+ |
} // namespace blink |