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

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

Issue 311733004: Introduce KeepAliveWhilePending to ScriptPromiseResolverWithContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@refactor-webmidi-initialization
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
Index: Source/modules/crypto/SubtleCrypto.h
diff --git a/Source/modules/crypto/SubtleCrypto.h b/Source/modules/crypto/SubtleCrypto.h
index ad7f201c043f76eb9a9b1d884921316d1bad2fd6..60c57b2d6c80ebcc348b2b9561b2229b1ea83abf 100644
--- a/Source/modules/crypto/SubtleCrypto.h
+++ b/Source/modules/crypto/SubtleCrypto.h
@@ -33,10 +33,11 @@
#include "bindings/v8/ScriptPromise.h"
#include "bindings/v8/ScriptWrappable.h"
+#include "modules/crypto/CrossThreadCryptoResult.h"
#include "platform/heap/Handle.h"
+#include "public/platform/WebCryptoAlgorithm.h"
#include "wtf/ArrayPiece.h"
#include "wtf/Forward.h"
-#include "wtf/RefCounted.h"
namespace WebCore {
@@ -49,6 +50,7 @@ public:
{
return new SubtleCrypto();
}
+ virtual ~SubtleCrypto();
ScriptPromise encrypt(ScriptState*, const Dictionary&, Key*, const ArrayPiece&);
ScriptPromise decrypt(ScriptState*, const Dictionary&, Key*, const ArrayPiece&);
@@ -64,10 +66,15 @@ public:
ScriptPromise wrapKey(ScriptState*, const String&, Key*, Key*, const Dictionary&);
ScriptPromise unwrapKey(ScriptState*, const String&, const ArrayPiece&, Key*, const Dictionary&, const Dictionary&, bool, const Vector<String>&);
- void trace(Visitor*) { }
+ void trace(Visitor*);
private:
+ class PendingResult;
SubtleCrypto();
+
+ ScriptPromise startCryptoOperation(ScriptState*, const Dictionary&, Key*, blink::WebCryptoOperation, const ArrayPiece& signature, const ArrayPiece& dataBuffer);
+ PassRefPtr<CrossThreadCryptoResult<PendingResult> > createCrossThreadCryptoResult(ScriptState*, ScriptPromise*);
+ HeapHashSet<Member<PendingResult> > m_pendingResults;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698