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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp

Issue 2691903005: ServiceWorker: Change base URL for parsing script URL and scope URL (Closed)
Patch Set: Address comments on tests Created 3 years, 10 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/bindings/core/v8/V8Binding.cpp ('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/modules/serviceworkers/ServiceWorkerContainer.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index fb3272ca97c5604dbc30b1fdda1efd92f4077d12..396af9c0d01cfadad0047eabecf1b927693d4dd6 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -282,16 +282,14 @@ ScriptPromise ServiceWorkerContainer::registerServiceWorker(
if (!executionContext)
return ScriptPromise();
- KURL scriptURL =
- enteredExecutionContext(scriptState->isolate())->completeURL(url);
+ KURL scriptURL = executionContext->completeURL(url);
scriptURL.removeFragmentIdentifier();
KURL patternURL;
if (options.scope().isNull())
patternURL = KURL(scriptURL, "./");
else
- patternURL = enteredExecutionContext(scriptState->isolate())
- ->completeURL(options.scope());
+ patternURL = executionContext->completeURL(options.scope());
registerServiceWorkerImpl(
executionContext, scriptURL, patternURL,
@@ -339,8 +337,7 @@ ScriptPromise ServiceWorkerContainer::getRegistration(
return promise;
}
- KURL completedURL =
- enteredExecutionContext(scriptState->isolate())->completeURL(documentURL);
+ KURL completedURL = executionContext->completeURL(documentURL);
completedURL.removeFragmentIdentifier();
if (!documentOrigin->canRequest(completedURL)) {
RefPtr<SecurityOrigin> documentURLOrigin =
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698