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

Unified Diff: Source/core/workers/AbstractWorker.cpp

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. Created 7 years 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 | « Source/core/events/MessageEvent.cpp ('k') | Source/core/workers/SharedWorker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/AbstractWorker.cpp
diff --git a/Source/core/workers/AbstractWorker.cpp b/Source/core/workers/AbstractWorker.cpp
index 2159b1da10f937d18ff466778105db215070ab0c..a617c23b4f5da262cc5eb717e56938a281ac8f96 100644
--- a/Source/core/workers/AbstractWorker.cpp
+++ b/Source/core/workers/AbstractWorker.cpp
@@ -53,18 +53,18 @@ KURL AbstractWorker::resolveURL(const String& url, ExceptionState& exceptionStat
// FIXME: This should use the dynamic global scope (bug #27887)
KURL scriptURL = executionContext()->completeURL(url);
if (!scriptURL.isValid()) {
- exceptionState.throwDOMException(SyntaxError, "Failed to create a worker: '" + url + "' is not a valid URL.");
+ exceptionState.throwDOMException(SyntaxError, "'" + url + "' is not a valid URL.");
return KURL();
}
// We can safely expose the URL in the following exceptions, as these checks happen synchronously before redirection. JavaScript receives no new information.
if (!executionContext()->securityOrigin()->canRequest(scriptURL)) {
- exceptionState.throwSecurityError("Failed to create a worker: script at '" + scriptURL.elidedString() + "' cannot be accessed from origin '" + executionContext()->securityOrigin()->toString() + "'.");
+ exceptionState.throwSecurityError("Script at '" + scriptURL.elidedString() + "' cannot be accessed from origin '" + executionContext()->securityOrigin()->toString() + "'.");
return KURL();
}
if (executionContext()->contentSecurityPolicy() && !executionContext()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) {
- exceptionState.throwSecurityError("Failed to create a worker: access to the script at '" + scriptURL.elidedString() + "' is denied by the document's Content Security Policy.");
+ exceptionState.throwSecurityError("Access to the script at '" + scriptURL.elidedString() + "' is denied by the document's Content Security Policy.");
return KURL();
}
« no previous file with comments | « Source/core/events/MessageEvent.cpp ('k') | Source/core/workers/SharedWorker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698