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

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

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: use v8::Local instead of v8::Handle 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
« no previous file with comments | « no previous file | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MessagePort.h
diff --git a/Source/core/dom/MessagePort.h b/Source/core/dom/MessagePort.h
index 114e0be89512c6b3e6154c1919a9aa2229ca9ffc..200f659bd0bfb2578bfaa6b408eaf5107a6fdfd6 100644
--- a/Source/core/dom/MessagePort.h
+++ b/Source/core/dom/MessagePort.h
@@ -43,8 +43,9 @@
namespace blink {
class ExceptionState;
-class MessagePort;
class ExecutionContext;
+class MessagePort;
+class ScriptState;
class SerializedScriptValue;
// The overwhelmingly common case is sending a single port, so handle that efficiently with an inline buffer of size 1.
@@ -112,6 +113,8 @@ private:
// WebMessagePortChannelClient implementation.
virtual void messageAvailable() override;
+ virtual v8::Isolate* scriptIsolate() override;
+ virtual v8::Local<v8::Context> scriptContextForMessageConversion() override;
void dispatchMessages();
OwnPtr<WebMessagePortChannel> m_entangledChannel;
@@ -120,6 +123,8 @@ private:
bool m_closed;
WeakPtrFactory<MessagePort> m_weakFactory;
+
+ RefPtr<ScriptState> m_scriptStateForConversion;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698