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

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

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 12 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: third_party/WebKit/Source/bindings/core/v8/ModuleProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.cpp
index fe512186df64ca3175f2b48faa3fb2bc7b48b78f..180edb5b9b85efd9e23a3731136a0d23795e249a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.cpp
@@ -14,4 +14,26 @@ ModuleProxy& ModuleProxy::moduleProxy()
return moduleProxy;
}
+ExecutionContext* ModuleProxy::toExecutionContextForModules(v8::Local<v8::Context> context)
haraken 2016/01/05 06:08:06 You can inline these methods.
ikilpatrick 2016/01/07 22:47:35 Done.
+{
+ RELEASE_ASSERT(m_toExecutionContextForModules);
+ return (*m_toExecutionContextForModules)(context);
+}
+
+void ModuleProxy::registerToExecutionContextForModules(ExecutionContext* (*toExecutionContextForModules)(v8::Local<v8::Context>))
+{
+ m_toExecutionContextForModules = toExecutionContextForModules;
+}
+
+v8::Local<v8::Context> ModuleProxy::toV8ContextForModules(ExecutionContext* context)
+{
+ RELEASE_ASSERT(m_toV8ContextForModules);
+ return (*m_toV8ContextForModules)(context);
+}
+
+void ModuleProxy::registerToV8ContextForModules(v8::Local<v8::Context> (*toV8ContextForModules)(ExecutionContext*))
+{
+ m_toV8ContextForModules = toV8ContextForModules;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698