| Index: Source/core/page/EventSource.cpp
|
| diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
|
| index f76f2fc675e949bf2b76ca21acb82703fd04da16..493e36043b803c147bd473a88bed0b5a65fad898 100644
|
| --- a/Source/core/page/EventSource.cpp
|
| +++ b/Source/core/page/EventSource.cpp
|
| @@ -124,7 +124,9 @@ void EventSource::connect()
|
| {
|
| ASSERT(m_state == CONNECTING);
|
| ASSERT(!m_requestInFlight);
|
| + ASSERT(executionContext());
|
|
|
| + ExecutionContext& executionContext = *this->executionContext();
|
| ResourceRequest request(m_url);
|
| request.setHTTPMethod("GET");
|
| request.setHTTPHeaderField("Accept", "text/event-stream");
|
| @@ -132,7 +134,7 @@ void EventSource::connect()
|
| if (!m_lastEventId.isEmpty())
|
| request.setHTTPHeaderField("Last-Event-ID", m_lastEventId);
|
|
|
| - SecurityOrigin* origin = executionContext()->securityOrigin();
|
| + SecurityOrigin* origin = executionContext.securityOrigin();
|
|
|
| ThreadableLoaderOptions options;
|
| options.sniffContent = DoNotSniffContent;
|
| @@ -142,9 +144,9 @@ void EventSource::connect()
|
| options.crossOriginRequestPolicy = UseAccessControl;
|
| options.dataBufferingPolicy = DoNotBufferData;
|
| options.securityOrigin = origin;
|
| - options.contentSecurityPolicyEnforcement = ContentSecurityPolicy::shouldBypassMainWorld(executionContext()) ? DoNotEnforceContentSecurityPolicy : EnforceConnectSrcDirective;
|
| + options.contentSecurityPolicyEnforcement = ContentSecurityPolicy::shouldBypassMainWorld(&executionContext) ? DoNotEnforceContentSecurityPolicy : EnforceConnectSrcDirective;
|
|
|
| - m_loader = ThreadableLoader::create(executionContext(), this, request, options);
|
| + m_loader = ThreadableLoader::create(executionContext, this, request, options);
|
|
|
| if (m_loader)
|
| m_requestInFlight = true;
|
|
|