Chromium Code Reviews| 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 { |
|
haraken
2014/12/16 13:54:33
Does this need to be RefCountedGarbageCollected? I
tasak
2014/12/17 08:40:08
ScriptPromiseResolver uses ref/deref. So need to b
sof
2014/12/17 09:32:03
Could you point out where & how?
|
| 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. |