| Index: Source/core/page/EventSource.cpp
|
| diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
|
| index 24b96083fdcd3c3ba0f8f741c885e94bfd92e074..f9cb1c52ec508fb95249d1d077e7f15ab24e9fab 100644
|
| --- a/Source/core/page/EventSource.cpp
|
| +++ b/Source/core/page/EventSource.cpp
|
| @@ -92,7 +92,8 @@ PassRefPtr<EventSource> EventSource::create(ScriptExecutionContext* context, con
|
| shouldBypassMainWorldContentSecurityPolicy = document->frame()->script()->shouldBypassMainWorldContentSecurityPolicy();
|
| }
|
| if (!shouldBypassMainWorldContentSecurityPolicy && !context->contentSecurityPolicy()->allowConnectToSource(fullURL)) {
|
| - es.throwDOMException(SecurityError, "Refused to connect to '" + fullURL.elidedString() + "' because it violates the document's Content Security Policy.");
|
| + // We can safely expose the URL to JavaScript, as this exception is generate synchronously before any redirects take place.
|
| + es.throwSecurityError("Refused to connect to '" + fullURL.elidedString() + "' because it violates the document's Content Security Policy.");
|
| return 0;
|
| }
|
|
|
|
|