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

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

Issue 1750453002: Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 0a1e81a2e4173cfa9156f607db0172aae54351a5..81050242d0c5948044fd771725692ae14400ff73 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/ActiveDOMObject.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "platform/heap/GarbageCollected.h"
#include "platform/heap/Handle.h"
@@ -18,7 +18,7 @@ namespace blink {
class ReadableStreamController;
-class CORE_EXPORT UnderlyingSourceBase : public GarbageCollectedFinalized<UnderlyingSourceBase>, public ScriptWrappable, public ActiveDOMObject {
+class CORE_EXPORT UnderlyingSourceBase : public GarbageCollectedFinalized<UnderlyingSourceBase>, public ScriptWrappable, public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UnderlyingSourceBase);
@@ -34,15 +34,13 @@ public:
ScriptPromise cancelWrapper(ScriptState*, ScriptValue reason);
virtual ScriptPromise cancel(ScriptState*, ScriptValue reason);
- // ActiveDOMObject
bool hasPendingActivity() const override;
- void stop() override;
+ void contextDestroyed() override;
protected:
explicit UnderlyingSourceBase(ScriptState* scriptState)
- : ActiveDOMObject(scriptState->executionContext())
+ : ContextLifecycleObserver(scriptState->executionContext())
{
- this->suspendIfNeeded();
}
ReadableStreamController* controller() const { return m_controller; }

Powered by Google App Engine
This is Rietveld 408576698