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

Unified Diff: Source/core/dom/MessagePort.cpp

Issue 924983002: Expose v8 context a MessagePort lives in to give content side code a valid context to (de)serialize… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months 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: Source/core/dom/MessagePort.cpp
diff --git a/Source/core/dom/MessagePort.cpp b/Source/core/dom/MessagePort.cpp
index d9da4a2e26a76e97ed76ca6076dc57a389cf9513..4138eefee0ca69bdf033897ed8e87e7c582cf264 100644
--- a/Source/core/dom/MessagePort.cpp
+++ b/Source/core/dom/MessagePort.cpp
@@ -266,4 +266,16 @@ void MessagePort::trace(Visitor* visitor)
EventTargetWithInlineData::trace(visitor);
}
+v8::Isolate* MessagePort::scriptIsolate()
+{
+ ASSERT(executionContext());
+ return toIsolate(executionContext());
+}
+
+v8::Handle<v8::Context> MessagePort::scriptContext()
+{
+ ASSERT(executionContext());
+ return toV8Context(executionContext(), DOMWrapperWorld::mainWorld());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698