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/UnderlyingSourceBase.h

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates 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 38e51fd944aa33f1af1f695c4204850528b66d49..5db69b0b0eb84d034375457d6e6adee8685f5bf7 100644
--- a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
+++ b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h
@@ -5,6 +5,7 @@
#ifndef UnderlyingSourceBase_h
#define UnderlyingSourceBase_h
+#include "bindings/core/v8/ActiveScriptWrappable.h"
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
@@ -18,7 +19,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 ActiveScriptWrappable, public ActiveDOMObject {
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(UnderlyingSourceBase);
@@ -34,13 +35,16 @@ public:
ScriptPromise cancelWrapper(ScriptState*, ScriptValue reason);
virtual ScriptPromise cancel(ScriptState*, ScriptValue reason);
+ // ActiveScriptWrappable
+ bool hasPendingActivity() const final;
+
// ActiveDOMObject
- bool hasPendingActivity() const override;
void stop() override;
protected:
explicit UnderlyingSourceBase(ScriptState* scriptState)
- : ActiveDOMObject(scriptState->getExecutionContext())
+ : ActiveScriptWrappable(this)
+ , ActiveDOMObject(scriptState->getExecutionContext())
{
this->suspendIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698