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..2123b434f860a08c2ae991f09c1c73b9613a25ab 100644 |
| --- a/Source/modules/crypto/CryptoResultImpl.h |
| +++ b/Source/modules/crypto/CryptoResultImpl.h |
| @@ -71,13 +71,18 @@ public: |
| // ScriptPromise. |
| ScriptPromise promise(); |
| + void clearResolver(); |
|
eroman
2014/12/09 19:15:29
Make this function private.
tasak
2014/12/11 09:44:39
Done.
|
| + |
| private: |
| class WeakResolver; |
|
yhirano
2014/12/11 02:27:59
WeakResolver is no long "weak", so just Resolver i
tasak
2014/12/11 09:44:39
Done.
|
| explicit CryptoResultImpl(ScriptState*); |
| void cancel(); |
| - WeakPtr<ScriptPromiseResolver> m_resolver; |
| + // Since ScriptPromiseResolver destroys itself, we should not use RefPtr here. |
|
yhirano
2014/12/11 02:27:59
Please wrap comments in 80 columns.
tasak
2014/12/11 09:44:39
Done.
|
| + // 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; |
| volatile int m_cancelled; |
| }; |