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

Unified Diff: third_party/WebKit/Source/modules/worklet/Worklet.cpp

Issue 2029163002: Worklets - Change inheritance heirarchy of WorkletGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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/modules/worklet/Worklet.cpp
diff --git a/third_party/WebKit/Source/modules/worklet/Worklet.cpp b/third_party/WebKit/Source/modules/worklet/Worklet.cpp
index c7d910ac73277c1ce308e285cf9e03dcc2721388..950b1b63e865515f719a634d8eb0470b6ebc2478 100644
--- a/third_party/WebKit/Source/modules/worklet/Worklet.cpp
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.cpp
@@ -5,13 +5,12 @@
#include "modules/worklet/Worklet.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
#include "core/inspector/InspectorInstrumentation.h"
-#include "modules/worklet/WorkletGlobalScope.h"
+#include "core/workers/WorkletGlobalScopeProxy.h"
namespace blink {
@@ -62,8 +61,8 @@ void Worklet::onFinished(WorkerScriptLoader* scriptLoader, ScriptPromiseResolver
// TODO(ikilpatrick): Worklets don't have the same error behaviour
// as workers, etc. For a SyntaxError we should reject, however if
// the script throws a normal error, resolve. For now just resolve.
- workletGlobalScope()->scriptController()->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->url()));
- InspectorInstrumentation::scriptImported(workletGlobalScope(), scriptLoader->identifier(), scriptLoader->script());
+ workletGlobalScopeProxy()->evaluateScript(scriptLoader->script(), scriptLoader->url());
+ InspectorInstrumentation::scriptImported(getExecutionContext(), scriptLoader->identifier(), scriptLoader->script());
resolver->resolve();
}
@@ -78,7 +77,7 @@ void Worklet::onFinished(WorkerScriptLoader* scriptLoader, ScriptPromiseResolver
void Worklet::stop()
{
- workletGlobalScope()->dispose();
+ workletGlobalScopeProxy()->terminateWorkletGlobalScope();
for (auto scriptLoader : m_scriptLoaders) {
scriptLoader->cancel();
« no previous file with comments | « third_party/WebKit/Source/modules/worklet/Worklet.h ('k') | third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698