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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerClients.cpp

Issue 1209933003: ServiceWorkerClients::openWindow() should reject with TypeError for an invalid URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerClients.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/Source/modules/serviceworkers/ServiceWorkerClients.cpp
index df3afdf2491ce3e1bb349fb29d82701604313725..48e5176675ff04e26da0ed72231341e748576035 100644
--- a/Source/modules/serviceworkers/ServiceWorkerClients.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerClients.cpp
@@ -115,7 +115,7 @@ ScriptPromise ServiceWorkerClients::openWindow(ScriptState* scriptState, const S
KURL parsedUrl = KURL(toWorkerGlobalScope(context)->location()->url(), url);
if (!parsedUrl.isValid()) {
- resolver->reject(DOMException::create(SyntaxError, "'" + url + "' is not a valid URL."));
+ resolver->reject(V8ThrowException::createTypeError(scriptState->isolate(), "'" + url + "' is not a valid URL."));
return promise;
}
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698