Index: Source/core/page/EventSource.cpp |
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp |
index 5d51d016f8335dd230c17cbd1cfeb485fca5d25f..853626802149ade2e6d86d4fa81391ec29d3a452 100644 |
--- a/Source/core/page/EventSource.cpp |
+++ b/Source/core/page/EventSource.cpp |
@@ -125,6 +125,7 @@ void EventSource::connect() |
ASSERT(m_state == CONNECTING); |
ASSERT(!m_requestInFlight); |
+ ExecutionContext* executionContext = this->executionContext(); |
Inactive
2014/04/01 13:25:04
nit: We should probably add an assert after this a
adamk
2014/04/02 17:16:42
Seems like the nicest-looking change is:
ASSERT(e
|
ResourceRequest request(m_url); |
request.setHTTPMethod("GET"); |
request.setHTTPHeaderField("Accept", "text/event-stream"); |
@@ -132,7 +133,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 +143,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; |