| Index: third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
|
| diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
|
| index 3072a54a4feac27db0e948bee34d9948b5f9240b..87ef6a1816b7e8a4f995f672c3a8c3f78c964702 100644
|
| --- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
|
| +++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
|
| @@ -345,6 +345,12 @@ void DOMWebSocket::connect(const String& url, const Vector<String>& protocols, E
|
| }
|
| }
|
|
|
| + if (getExecutionContext()->getSecurityOrigin()->hasSuborigin()) {
|
| + m_state = kClosed;
|
| + exceptionState.throwSecurityError("Connecting to a WebSocket from a suborigin is not allowed.");
|
| + return;
|
| + }
|
| +
|
| String protocolString;
|
| if (!protocols.isEmpty())
|
| protocolString = joinStrings(protocols, subprotocolSeperator());
|
|
|