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

Unified Diff: third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp

Issue 2639153004: Worker: Stop accessing ExecutionContext passed by ExecutionContextTask (Closed)
Patch Set: address review comments Created 3 years, 11 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 | « third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
index 95af30223caf52b8f9bcf076fb38a94b77f9e7dc..6fa7b14e920e6805229208b599841712ecac98dd 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
@@ -4,7 +4,11 @@
#include "core/workers/ThreadedWorkletObjectProxy.h"
+#include "bindings/core/v8/ScriptSourceCode.h"
+#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
+#include "core/workers/ThreadedWorkletGlobalScope.h"
#include "core/workers/ThreadedWorkletMessagingProxy.h"
+#include "core/workers/WorkerThread.h"
#include "wtf/PtrUtil.h"
#include <memory>
@@ -20,6 +24,15 @@ std::unique_ptr<ThreadedWorkletObjectProxy> ThreadedWorkletObjectProxy::create(
ThreadedWorkletObjectProxy::~ThreadedWorkletObjectProxy() {}
+void ThreadedWorkletObjectProxy::evaluateScript(const String& source,
+ const KURL& scriptURL,
+ WorkerThread* workerThread) {
+ ThreadedWorkletGlobalScope* globalScope =
+ toThreadedWorkletGlobalScope(workerThread->globalScope());
+ globalScope->scriptController()->evaluate(
+ ScriptSourceCode(source, scriptURL));
+}
+
ThreadedWorkletObjectProxy::ThreadedWorkletObjectProxy(
const WeakPtr<ThreadedWorkletMessagingProxy>& messagingProxyWeakPtr,
ParentFrameTaskRunners* parentFrameTaskRunners)
« no previous file with comments | « third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698