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

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

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tidy unit tests Created 5 years, 5 months 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 b6cb6e90126c8290fdfbbd3a2172afc230868247..4517484e5548bfceb5d6a50c4b9fa09aa6d27a2b 100644
--- a/Source/modules/crypto/CryptoResultImpl.h
+++ b/Source/modules/crypto/CryptoResultImpl.h
@@ -55,9 +55,9 @@ MODULES_EXPORT ExceptionCode webCryptoErrorToExceptionCode(WebCryptoErrorType);
// m_resolver will be leaked until the ExecutionContext is destroyed.
class CryptoResultImpl final : public CryptoResult {
public:
- ~CryptoResultImpl();
+ static CryptoResultImpl* create(ScriptState*);
- static PassRefPtrWillBeRawPtr<CryptoResultImpl> create(ScriptState*);
+ ~CryptoResultImpl();
void completeWithError(WebCryptoErrorType, const WebString&) override;
void completeWithBuffer(const void* bytes, unsigned bytesSize) override;
@@ -71,6 +71,8 @@ public:
// ScriptPromise.
ScriptPromise promise();
+ DECLARE_VIRTUAL_TRACE();
+
private:
class Resolver;
explicit CryptoResultImpl(ScriptState*);
@@ -78,9 +80,7 @@ private:
void clearResolver();
void cancel();
- // FIXME: ScriptPromiseResolver should not be exported.
- // Instead, use ScriptPromise.
- ScriptPromiseResolver* m_resolver;
+ Member<Resolver> m_resolver;
volatile int m_cancelled;
};

Powered by Google App Engine
This is Rietveld 408576698