Commit 11b209ca authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

bindings: Fix how to check a member is missing

IDL dictionary provides a way to check if a member is missing or not.
This CL fixes a wrong way of the check in ServiceWorkerContainer.

Bug: 839389
Change-Id: I7134bbcdfb290db26fca14aeaa903d165215097d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224421
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774445}
parent 33488049
......@@ -280,10 +280,10 @@ ScriptPromise ServiceWorkerContainer::registerServiceWorker(
}
KURL scope_url;
if (options->scope().IsNull())
scope_url = KURL(script_url, "./");
else
if (options->hasScope())
scope_url = execution_context->CompleteURL(options->scope());
else
scope_url = KURL(script_url, "./");
scope_url.RemoveFragmentIdentifier();
if (!SchemeRegistry::ShouldTreatURLSchemeAsAllowingServiceWorkers(
......
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