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

Unified Diff: third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h

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/UnderlyingSourceBase.h
diff --git a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
index 81050242d0c5948044fd771725692ae14400ff73..0a1e81a2e4173cfa9156f607db0172aae54351a5 100644
--- a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
+++ b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
@@ -10,7 +10,7 @@
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
-#include "core/dom/ContextLifecycleObserver.h"
+#include "core/dom/ActiveDOMObject.h"
#include "platform/heap/GarbageCollected.h"
#include "platform/heap/Handle.h"
@@ -18,7 +18,7 @@
class ReadableStreamController;
-class CORE_EXPORT UnderlyingSourceBase : public GarbageCollectedFinalized<UnderlyingSourceBase>, public ScriptWrappable, public ContextLifecycleObserver {
+class CORE_EXPORT UnderlyingSourceBase : public GarbageCollectedFinalized<UnderlyingSourceBase>, public ScriptWrappable, public ActiveDOMObject {
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UnderlyingSourceBase);
@@ -34,13 +34,15 @@
ScriptPromise cancelWrapper(ScriptState*, ScriptValue reason);
virtual ScriptPromise cancel(ScriptState*, ScriptValue reason);
+ // ActiveDOMObject
bool hasPendingActivity() const override;
- void contextDestroyed() override;
+ void stop() override;
protected:
explicit UnderlyingSourceBase(ScriptState* scriptState)
- : ContextLifecycleObserver(scriptState->executionContext())
+ : ActiveDOMObject(scriptState->executionContext())
{
+ this->suspendIfNeeded();
}
ReadableStreamController* controller() const { return m_controller; }
« no previous file with comments | « third_party/WebKit/Source/core/streams/Stream.cpp ('k') | third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698