| Index: third_party/WebKit/Source/core/page/EventSource.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/EventSource.cpp b/third_party/WebKit/Source/core/page/EventSource.cpp
|
| index 90a5c5d8da96eb18546d007722afde01b231b555..f194725a6bcfa21e5113c8542a3cfc78fe0aba93 100644
|
| --- a/third_party/WebKit/Source/core/page/EventSource.cpp
|
| +++ b/third_party/WebKit/Source/core/page/EventSource.cpp
|
| @@ -113,9 +113,9 @@ void EventSource::connect()
|
| {
|
| ASSERT(m_state == CONNECTING);
|
| ASSERT(!m_loader);
|
| - ASSERT(executionContext());
|
| + ASSERT(getExecutionContext());
|
|
|
| - ExecutionContext& executionContext = *this->executionContext();
|
| + ExecutionContext& executionContext = *this->getExecutionContext();
|
| ResourceRequest request(m_url);
|
| request.setHTTPMethod(HTTPNames::GET);
|
| request.setHTTPHeaderField(HTTPNames::Accept, "text/event-stream");
|
| @@ -129,7 +129,7 @@ void EventSource::connect()
|
| request.setHTTPHeaderField(HTTPNames::Last_Event_ID, AtomicString(reinterpret_cast<const LChar*>(lastEventIdUtf8.data()), lastEventIdUtf8.length()));
|
| }
|
|
|
| - SecurityOrigin* origin = executionContext.securityOrigin();
|
| + SecurityOrigin* origin = executionContext.getSecurityOrigin();
|
|
|
| ThreadableLoaderOptions options;
|
| options.preflightPolicy = PreventPreflight;
|
| @@ -150,7 +150,7 @@ void EventSource::connect()
|
|
|
| void EventSource::networkRequestEnded()
|
| {
|
| - InspectorInstrumentation::didFinishEventSourceRequest(executionContext(), this);
|
| + InspectorInstrumentation::didFinishEventSourceRequest(getExecutionContext(), this);
|
|
|
| m_loader = nullptr;
|
|
|
| @@ -213,9 +213,9 @@ const AtomicString& EventSource::interfaceName() const
|
| return EventTargetNames::EventSource;
|
| }
|
|
|
| -ExecutionContext* EventSource::executionContext() const
|
| +ExecutionContext* EventSource::getExecutionContext() const
|
| {
|
| - return ContextLifecycleObserver::executionContext();
|
| + return ContextLifecycleObserver::getExecutionContext();
|
| }
|
|
|
| void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
|
| @@ -238,7 +238,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
|
| message.append(charset);
|
| message.appendLiteral("\") that is not UTF-8. Aborting the connection.");
|
| // FIXME: We are missing the source line.
|
| - executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
|
| + getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
|
| }
|
| } else {
|
| // To keep the signal-to-noise ratio low, we only log 200-response with an invalid MIME type.
|
| @@ -248,7 +248,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
|
| message.append(response.mimeType());
|
| message.appendLiteral("\") that is not \"text/event-stream\". Aborting the connection.");
|
| // FIXME: We are missing the source line.
|
| - executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
|
| + getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
|
| }
|
| }
|
|
|
| @@ -299,7 +299,7 @@ void EventSource::didFailAccessControlCheck(const ResourceError& error)
|
| ASSERT(m_loader);
|
|
|
| String message = "EventSource cannot load " + error.failingURL() + ". " + error.localizedDescription();
|
| - executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
|
| + getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
|
|
|
| abortConnectionAttempt();
|
| }
|
| @@ -316,7 +316,7 @@ void EventSource::onMessageEvent(const AtomicString& eventType, const String& da
|
| RefPtrWillBeRawPtr<MessageEvent> e = MessageEvent::create();
|
| e->initMessageEvent(eventType, false, false, SerializedScriptValueFactory::instance().create(data), m_eventStreamOrigin, lastEventId, 0, nullptr);
|
|
|
| - InspectorInstrumentation::willDispatchEventSourceEvent(executionContext(), this, eventType, lastEventId, data);
|
| + InspectorInstrumentation::willDispatchEventSourceEvent(getExecutionContext(), this, eventType, lastEventId, data);
|
| dispatchEvent(e);
|
| }
|
|
|
|
|