| Index: Source/modules/websockets/NewWebSocketChannelImpl.cpp
|
| diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.cpp b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
|
| index 2de1ed7f3d9ca6bae0c9d9fc5f8ad192b3ff55e5..7b056012a46a1b31e2b628f282b8c0e9336ebfc1 100644
|
| --- a/Source/modules/websockets/NewWebSocketChannelImpl.cpp
|
| +++ b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
|
| @@ -39,6 +39,7 @@
|
| #include "core/inspector/InspectorInstrumentation.h"
|
| #include "core/inspector/InspectorTraceEvents.h"
|
| #include "core/loader/FrameLoader.h"
|
| +#include "core/loader/FrameLoaderClient.h"
|
| #include "core/loader/MixedContentChecker.h"
|
| #include "core/loader/UniqueIdentifier.h"
|
| #include "modules/websockets/WebSocketChannelClient.h"
|
| @@ -154,7 +155,11 @@ bool NewWebSocketChannelImpl::connect(const KURL& url, const String& protocol)
|
| for (size_t i = 0; i < protocols.size(); ++i) {
|
| webProtocols[i] = protocols[i];
|
| }
|
| +
|
| + if (executionContext()->isDocument() && document()->frame())
|
| + document()->frame()->loader().client()->dispatchWillOpenWebSocket(m_handle.get());
|
| m_handle->connect(url, webProtocols, *executionContext()->securityOrigin(), this);
|
| +
|
| flowControlIfNecessary();
|
| if (m_identifier) {
|
| TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "WebSocketCreate", "data", InspectorWebSocketCreateEvent::data(document(), m_identifier, url, protocol));
|
|
|