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

Unified Diff: Source/modules/crypto/CryptoResultImpl.h

Issue 783423003: Make ScriptPromiseResolver RefCountedWillBeRefCountedGarbageCollected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP: 1st trial 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/modules/crypto/CryptoResultImpl.h
diff --git a/Source/modules/crypto/CryptoResultImpl.h b/Source/modules/crypto/CryptoResultImpl.h
index 3ea352cb662d7b5bb8d5a35704e30b9bfeaeb49d..d2e5cf2118f4c358c2aec9bfdff86c67040a6315 100644
--- a/Source/modules/crypto/CryptoResultImpl.h
+++ b/Source/modules/crypto/CryptoResultImpl.h
@@ -57,7 +57,7 @@ class CryptoResultImpl final : public CryptoResult {
public:
~CryptoResultImpl();
- static PassRefPtr<CryptoResultImpl> create(ScriptState*);
+ static PassRefPtrWillBeRawPtr<CryptoResultImpl> create(ScriptState*);
virtual void completeWithError(WebCryptoErrorType, const WebString&) override;
virtual void completeWithBuffer(const void* bytes, unsigned bytesSize) override;
@@ -71,13 +71,21 @@ public:
// ScriptPromise.
ScriptPromise promise();
+ void clearResolver();
+
private:
+ ScriptPromiseResolver* resolver();
+
class WeakResolver;
explicit CryptoResultImpl(ScriptState*);
void cancel();
- WeakPtr<ScriptPromiseResolver> m_resolver;
+#if !ENABLE(OILPAN)
+ RawPtr<ScriptPromiseResolver> m_resolver;
+#else
+ OwnPtr<Persistent<ScriptPromiseResolver>> m_resolver;
+#endif
volatile int m_cancelled;
};

Powered by Google App Engine
This is Rietveld 408576698