| Index: Source/modules/websockets/WebSocket.cpp
|
| diff --git a/Source/modules/websockets/WebSocket.cpp b/Source/modules/websockets/WebSocket.cpp
|
| index 9fea9ba75719a6a8d68e9f3ff71145733b721b12..93d0a8a35deaa891ec70234f935bc362b073ab02 100644
|
| --- a/Source/modules/websockets/WebSocket.cpp
|
| +++ b/Source/modules/websockets/WebSocket.cpp
|
| @@ -307,12 +307,12 @@ void WebSocket::connect(const String& url, const Vector<String>& protocols, Exce
|
| }
|
|
|
| // 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 (executionContext()->isDocument()) {
|
| Document* document = toDocument(executionContext());
|
| - shouldBypassMainWorldContentSecurityPolicy = document->frame()->script().shouldBypassMainWorldContentSecurityPolicy();
|
| + shouldBypassMainWorldCSP = document->frame()->script().shouldBypassMainWorldCSP();
|
| }
|
| - if (!shouldBypassMainWorldContentSecurityPolicy && !executionContext()->contentSecurityPolicy()->allowConnectToSource(m_url)) {
|
| + if (!shouldBypassMainWorldCSP && !executionContext()->contentSecurityPolicy()->allowConnectToSource(m_url)) {
|
| m_state = CLOSED;
|
| // The URL is safe to expose to JavaScript, as this check happens synchronously before redirection.
|
| exceptionState.throwSecurityError("Refused to connect to '" + m_url.elidedString() + "' because it violates the document's Content Security Policy.");
|
|
|