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

Unified Diff: Source/bindings/core/v8/ScriptPromiseResolver.h

Issue 783423003: Make ScriptPromiseResolver RefCountedWillBeRefCountedGarbageCollected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/bindings/core/v8/ScriptPromiseResolver.h
diff --git a/Source/bindings/core/v8/ScriptPromiseResolver.h b/Source/bindings/core/v8/ScriptPromiseResolver.h
index 7815da11eb72dca39b740ea8ed96940379593931..cae1559726660f1f15ebce338a012501240924a9 100644
--- a/Source/bindings/core/v8/ScriptPromiseResolver.h
+++ b/Source/bindings/core/v8/ScriptPromiseResolver.h
@@ -25,13 +25,12 @@ namespace blink {
// ExecutionContext state. When the ExecutionContext is suspended,
// resolve or reject will be delayed. When it is stopped, resolve or reject
// will be ignored.
-class ScriptPromiseResolver : public ActiveDOMObject, public RefCounted<ScriptPromiseResolver> {
+class ScriptPromiseResolver : public RefCountedWillBeRefCountedGarbageCollected<ScriptPromiseResolver>, public ActiveDOMObject {
WTF_MAKE_NONCOPYABLE(ScriptPromiseResolver);
-
public:
- static PassRefPtr<ScriptPromiseResolver> create(ScriptState* scriptState)
+ static PassRefPtrWillBeRawPtr<ScriptPromiseResolver> create(ScriptState* scriptState)
{
- RefPtr<ScriptPromiseResolver> resolver = adoptRef(new ScriptPromiseResolver(scriptState));
+ RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = adoptRefWillBeNoop(new ScriptPromiseResolver(scriptState));
resolver->suspendIfNeeded();
return resolver.release();
}
@@ -85,6 +84,8 @@ public:
// promise is pending and the associated ExecutionContext isn't stopped.
void keepAliveWhilePending();
+ virtual void trace(Visitor*) { }
+
protected:
// You need to call suspendIfNeeded after the construction because
// this is an ActiveDOMObject.
« no previous file with comments | « Source/bindings/core/v8/CallbackPromiseAdapter.h ('k') | Source/bindings/core/v8/ScriptPromiseResolverTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698