Chromium Code Reviews| Index: Source/modules/crypto/CryptoResultImpl.h | 
| diff --git a/Source/modules/crypto/CryptoResultImpl.h b/Source/modules/crypto/CryptoResultImpl.h | 
| index 3ea352cb662d7b5bb8d5a35704e30b9bfeaeb49d..1ff25603150293c60440812529b059a0ede7cda3 100644 | 
| --- a/Source/modules/crypto/CryptoResultImpl.h | 
| +++ b/Source/modules/crypto/CryptoResultImpl.h | 
| @@ -72,13 +72,20 @@ public: | 
| ScriptPromise promise(); | 
| private: | 
| 
 
yhirano
2014/12/11 12:28:41
By making Resolver this class's inner class and ha
 
tasak
2014/12/12 07:56:51
Done.
 
 | 
| - class WeakResolver; | 
| explicit CryptoResultImpl(ScriptState*); | 
| + void clearResolver(); | 
| void cancel(); | 
| - WeakPtr<ScriptPromiseResolver> m_resolver; | 
| + // Since ScriptPromiseResolver destroys itself, we should not use RefPtr | 
| 
 
haraken
2014/12/12 00:04:11
Just help me understand: Where is the ScriptPromis
 
tasak
2014/12/12 07:56:51
ScriptPromiseResolver destorys itself.
So basicall
 
 | 
| + // here. So to avoid using stale pointer, m_resolver should be cleared | 
| + // after resolving. | 
| + // FIXME: ScriptPromiseResolver should not be exported. | 
| + // Instead, use ScriptPromise. | 
| + RawPtr<ScriptPromiseResolver> m_resolver; | 
| 
 
haraken
2014/12/12 00:04:10
RawPtr<ScriptPromiseResolver> => ScriptPromiseReso
 
tasak
2014/12/12 07:56:51
Done.
 
 | 
| volatile int m_cancelled; | 
| + | 
| + friend class CryptoResultResolver; | 
| }; | 
| } // namespace blink |