Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(975)

Unified Diff: Source/core/page/EventSource.cpp

Issue 1179733009: Always enable Oilpan for EventSource. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: msvc compile fix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/EventSource.h ('k') | Source/core/page/EventSource.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventSource.cpp
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
index 6ee1cee14b8f47324f6155082c79adaf102a44c2..8f893ca29f11ef93ffa3666fd82eee0ac7adba90 100644
--- a/Source/core/page/EventSource.cpp
+++ b/Source/core/page/EventSource.cpp
@@ -74,7 +74,7 @@ inline EventSource::EventSource(ExecutionContext* context, const KURL& url, cons
{
}
-PassRefPtrWillBeRawPtr<EventSource> EventSource::create(ExecutionContext* context, const String& url, const EventSourceInit& eventSourceInit, ExceptionState& exceptionState)
+EventSource* EventSource::create(ExecutionContext* context, const String& url, const EventSourceInit& eventSourceInit, ExceptionState& exceptionState)
{
if (url.isEmpty()) {
exceptionState.throwDOMException(SyntaxError, "Cannot open an EventSource to an empty URL.");
@@ -94,12 +94,11 @@ PassRefPtrWillBeRawPtr<EventSource> EventSource::create(ExecutionContext* contex
return nullptr;
}
- RefPtrWillBeRawPtr<EventSource> source = adoptRefWillBeNoop(new EventSource(context, fullURL, eventSourceInit));
+ EventSource* source = new EventSource(context, fullURL, eventSourceInit);
source->scheduleInitialConnect();
source->suspendIfNeeded();
-
- return source.release();
+ return source;
}
EventSource::~EventSource()
@@ -424,6 +423,13 @@ void EventSource::parseEventStreamLine(unsigned bufPos, int fieldLength, int lin
void EventSource::stop()
{
close();
+
+ // (Non)Oilpan: In order to make Worker shutdowns clean,
+ // deref the loader. This will in turn deref its
+ // RefPtr<WorkerGlobalScope>.
+ //
+ // Worth doing regardless, it is no longer of use.
+ m_loader = nullptr;
}
bool EventSource::hasPendingActivity() const
@@ -441,7 +447,7 @@ PassRefPtrWillBeRawPtr<MessageEvent> EventSource::createMessageEvent()
DEFINE_TRACE(EventSource)
{
- EventTargetWithInlineData::trace(visitor);
+ RefCountedGarbageCollectedEventTargetWithInlineData::trace(visitor);
ActiveDOMObject::trace(visitor);
}
« no previous file with comments | « Source/core/page/EventSource.h ('k') | Source/core/page/EventSource.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698