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

Unified Diff: third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp

Issue 1808533003: Revert of Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp
diff --git a/third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp b/third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp
index 9c24a0c3cd4d2a4c9138898247ed1bab639219ec..987c3a0e447f4ad6d8e6c9945c4608cb017a4307 100644
--- a/third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp
+++ b/third_party/WebKit/Source/core/streams/ReadableStreamReader.cpp
@@ -15,10 +15,11 @@
namespace blink {
ReadableStreamReader::ReadableStreamReader(ExecutionContext* executionContext, ReadableStream* stream)
- : ContextLifecycleObserver(executionContext)
+ : ActiveDOMObject(executionContext)
, m_stream(stream)
, m_closed(new ClosedPromise(executionContext, this, ClosedPromise::Closed))
{
+ suspendIfNeeded();
ASSERT(m_stream->isLockedTo(nullptr));
m_stream->setReader(this);
@@ -109,19 +110,20 @@
return isActive() && m_stream->stateInternal() == ReadableStream::Readable;
}
-void ReadableStreamReader::contextDestroyed()
+void ReadableStreamReader::stop()
{
if (isActive()) {
// Calling |error| will release the lock.
m_stream->error(DOMException::create(AbortError, "The frame stops working."));
}
+ ActiveDOMObject::stop();
}
DEFINE_TRACE(ReadableStreamReader)
{
visitor->trace(m_stream);
visitor->trace(m_closed);
- ContextLifecycleObserver::trace(visitor);
+ ActiveDOMObject::trace(visitor);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/streams/ReadableStreamReader.h ('k') | third_party/WebKit/Source/core/streams/Stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698