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

Unified Diff: Source/core/page/EventSource.cpp

Issue 353873003: Clean up usage of CSP functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix to apply Created 6 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 | « Source/core/loader/ImageLoader.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventSource.cpp
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
index 38e5d5deb3877a0af7332614024d4dc2483abc0f..f301fadcfc0a1dcb47e45f7bf66e52dcd56e2b89 100644
--- a/Source/core/page/EventSource.cpp
+++ b/Source/core/page/EventSource.cpp
@@ -86,12 +86,12 @@ PassRefPtrWillBeRawPtr<EventSource> EventSource::create(ExecutionContext* contex
}
// FIXME: Convert this to check the isolated world's Content Security Policy once webkit.org/b/104520 is solved.
- bool shouldBypassMainWorldContentSecurityPolicy = false;
+ bool shouldBypassMainWorldCSP = false;
if (context->isDocument()) {
Document* document = toDocument(context);
- shouldBypassMainWorldContentSecurityPolicy = document->frame()->script().shouldBypassMainWorldContentSecurityPolicy();
+ shouldBypassMainWorldCSP = document->frame()->script().shouldBypassMainWorldCSP();
}
- if (!shouldBypassMainWorldContentSecurityPolicy && !context->contentSecurityPolicy()->allowConnectToSource(fullURL)) {
+ if (!shouldBypassMainWorldCSP && !context->contentSecurityPolicy()->allowConnectToSource(fullURL)) {
// We can safely expose the URL to JavaScript, as this exception is generate synchronously before any redirects take place.
exceptionState.throwSecurityError("Refused to connect to '" + fullURL.elidedString() + "' because it violates the document's Content Security Policy.");
return nullptr;
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698