Index: Source/modules/crypto/SubtleCrypto.cpp |
diff --git a/Source/modules/crypto/SubtleCrypto.cpp b/Source/modules/crypto/SubtleCrypto.cpp |
index 460db6c7e0bf59a82c77a428a8286c5ffea2e683..492bf904befa56a364c5cf855449f1af7d15816b 100644 |
--- a/Source/modules/crypto/SubtleCrypto.cpp |
+++ b/Source/modules/crypto/SubtleCrypto.cpp |
@@ -51,7 +51,7 @@ bool ensureNotNull(T* x, const char* paramName, CryptoResult* result) |
{ |
if (!x) { |
String message = String("Invalid ") + paramName + String(" argument"); |
- result->completeWithError(blink::WebString(message)); |
+ result->completeWithError(blink::WebCryptoErrorTypeType, blink::WebString(message)); |
return false; |
} |
return true; |
@@ -193,7 +193,7 @@ ScriptPromise SubtleCrypto::exportKey(const String& rawFormat, Key* key) |
return promise; |
if (!key->extractable()) { |
- result->completeWithError("key is not extractable"); |
+ result->completeWithError(blink::WebCryptoErrorTypeInvalidAccess, "key is not extractable"); |
return promise; |
} |
@@ -221,7 +221,7 @@ ScriptPromise SubtleCrypto::wrapKey(const String& rawFormat, Key* key, Key* wrap |
return promise; |
if (!key->extractable()) { |
- result->completeWithError("key is not extractable"); |
+ result->completeWithError(blink::WebCryptoErrorTypeInvalidAccess, "key is not extractable"); |
return promise; |
} |