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

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

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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 c86b41b6d4633717ee42c452489cf7e0a6bb5324..bfa13ad4c18c3e40d0c3552f1b717d1b5935eff4 100644
--- a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
+++ b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
@@ -11,7 +11,7 @@
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
-#include "core/dom/SuspendableObject.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "platform/heap/GarbageCollected.h"
#include "platform/heap/Handle.h"
@@ -23,7 +23,7 @@ class CORE_EXPORT UnderlyingSourceBase
: public GarbageCollectedFinalized<UnderlyingSourceBase>,
public ScriptWrappable,
public ActiveScriptWrappable<UnderlyingSourceBase>,
- public SuspendableObject {
+ public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(UnderlyingSourceBase);
@@ -45,14 +45,12 @@ class CORE_EXPORT UnderlyingSourceBase
// ScriptWrappable
bool hasPendingActivity() const;
- // SuspendableObject
+ // ContextLifecycleObserver
void contextDestroyed() override;
protected:
explicit UnderlyingSourceBase(ScriptState* scriptState)
- : SuspendableObject(scriptState->getExecutionContext()) {
- this->suspendIfNeeded();
- }
+ : ContextLifecycleObserver(scriptState->getExecutionContext()) {}
ReadableStreamController* controller() const { return m_controller; }

Powered by Google App Engine
This is Rietveld 408576698