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

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

Issue 312653005: [ABANDONED] Use AsyncInitializerResolver in WebCrypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@async-initializer
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/modules/crypto/CryptoResultImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/CryptoResultImpl.h
diff --git a/Source/modules/crypto/CryptoResultImpl.h b/Source/modules/crypto/CryptoResultImpl.h
index 117d6863218e978dd4a3a98503119949265fe4c7..03e47d58ae021868e817870a5d9f7024287d75e6 100644
--- a/Source/modules/crypto/CryptoResultImpl.h
+++ b/Source/modules/crypto/CryptoResultImpl.h
@@ -32,6 +32,7 @@
#define CryptoResultImpl_h
#include "bindings/v8/ScriptPromise.h"
+#include "core/dom/AsyncInitializerResolver.h"
#include "platform/CryptoResult.h"
#include "public/platform/WebCrypto.h"
#include "wtf/Forward.h"
@@ -48,7 +49,7 @@ namespace WebCore {
// * The CryptoResult interface must only be called from the origin thread.
// * addref() and deref() can be called from any thread.
// * One of the completeWith***() functions must be called, or the
-// PromiseState will be leaked until the ExecutionContext is destroyed.
+// Initializer will be leaked until the ExecutionContext is destroyed.
class CryptoResultImpl FINAL : public CryptoResult {
public:
~CryptoResultImpl();
@@ -61,14 +62,13 @@ public:
virtual void completeWithKey(const blink::WebCryptoKey&) OVERRIDE;
virtual void completeWithKeyPair(const blink::WebCryptoKey& publicKey, const blink::WebCryptoKey& privateKey) OVERRIDE;
- // It is only valid to call this before completion.
ScriptPromise promise();
private:
explicit CryptoResultImpl(ScriptState*);
+ class Initializer;
- class PromiseState;
- WeakPtr<PromiseState> m_promiseState;
+ WeakPtr<AsyncInitializerResolver<Initializer> > m_resolver;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/modules/crypto/CryptoResultImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698