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

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

Issue 2685543002: Support data URLs in worker constructors (Closed)
Patch Set: Added additional test for invalid javascript data: worker 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
Index: third_party/WebKit/Source/core/workers/AbstractWorker.cpp
diff --git a/third_party/WebKit/Source/core/workers/AbstractWorker.cpp b/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
index 2cc20f4a8c19acb1a1c4b8bf22b94a671ec868c9..8ff9ac2a77875132bdbc7669bc04d1e521afc3c1 100644
--- a/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
+++ b/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
@@ -57,7 +57,8 @@ KURL AbstractWorker::resolveURL(const String& url,
// We can safely expose the URL in the following exceptions, as these checks
// happen synchronously before redirection. JavaScript receives no new
// information.
- if (!getExecutionContext()->getSecurityOrigin()->canRequestNoSuborigin(
+ if (!scriptURL.protocolIsData() &&
+ !getExecutionContext()->getSecurityOrigin()->canRequestNoSuborigin(
scriptURL)) {
exceptionState.throwSecurityError(
"Script at '" + scriptURL.elidedString() +

Powered by Google App Engine
This is Rietveld 408576698