Commit 42dcb573 authored by Asami Doi's avatar Asami Doi Committed by Commit Bot

Worker: Add 'name' option to WorkerOptions

This CL adds a new 'name' option to the WorkerOptions dictionary,
but not fully implement it yet and instead shows the console message.
Subsequent CLs will implement it.

Spec: https://html.spec.whatwg.org/multipage/workers.html#workeroptions

Bug: 721219
Change-Id: Ie03ab85a9c3d5636017cc72e3389394b120da508
Reviewed-on: https://chromium-review.googlesource.com/1174581
Commit-Queue: Asami Doi <asamidoi@google.com>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583152}
parent b204bd73
......@@ -74,6 +74,14 @@ DedicatedWorker* DedicatedWorker::Create(ExecutionContext* context,
return nullptr;
}
if (options.name() != "") {
// TODO(asamidoi): Implement 'name' option (https://crbug.com/721219)
context->AddConsoleMessage(ConsoleMessage::Create(
kJSMessageSource, kInfoMessageLevel,
"'name' param in WorkerOptions is not implemented yet. See "
"https://crbug.com/721219 for details."));
}
// TODO(nhiroki): Remove this flag check once module loading for
// DedicatedWorker is enabled by default (https://crbug.com/680046).
if (options.type() == "module" &&
......
......@@ -6,8 +6,7 @@
dictionary WorkerOptions {
WorkerType type = "classic";
RequestCredentials credentials = "same-origin";
// TODO(nhiroki): Implement "name" option (https://crbug.com/721219)
// DOMString name = "";
DOMString name = "";
};
enum WorkerType { "classic", "module" };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment