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

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

Issue 2868413005: Worklet: Introduce WorkletOptions for addModule() (Closed)
Patch Set: add TODO comments Created 3 years, 7 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/core/workers/Worklet.cpp
diff --git a/third_party/WebKit/Source/core/workers/Worklet.cpp b/third_party/WebKit/Source/core/workers/Worklet.cpp
index 58dc60b66a0d64bc26b78743d55e28baeed6858a..6620d822b7d92d4b754b6a80fd0832aaa5d7423f 100644
--- a/third_party/WebKit/Source/core/workers/Worklet.cpp
+++ b/third_party/WebKit/Source/core/workers/Worklet.cpp
@@ -22,7 +22,8 @@ Worklet::Worklet(LocalFrame* frame)
// algorithm:
// https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
ScriptPromise Worklet::addModule(ScriptState* script_state,
- const String& module_url) {
+ const String& module_url,
+ const WorkletOptions& options) {
DCHECK(IsMainThread());
if (!GetExecutionContext()) {
return ScriptPromise::RejectWithDOMException(
@@ -54,9 +55,10 @@ ScriptPromise Worklet::addModule(ScriptState* script_state,
// |kUnspecedLoading| is used here because this is a part of script module
// loading.
TaskRunnerHelper::Get(TaskType::kUnspecedLoading, script_state)
- ->PostTask(BLINK_FROM_HERE,
- WTF::Bind(&Worklet::FetchAndInvokeScript, WrapPersistent(this),
- module_url_record, WrapPersistent(resolver)));
+ ->PostTask(
+ BLINK_FROM_HERE,
+ WTF::Bind(&Worklet::FetchAndInvokeScript, WrapPersistent(this),
+ module_url_record, options, WrapPersistent(resolver)));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698