Index: content/child/webcrypto/webcrypto_impl.cc |
diff --git a/content/child/webcrypto/webcrypto_impl.cc b/content/child/webcrypto/webcrypto_impl.cc |
index cc18630e4a7c402400a9d796c6c9ea4380f06ff7..4de04000ecf262e1731842aa7448e1452d086a8a 100644 |
--- a/content/child/webcrypto/webcrypto_impl.cc |
+++ b/content/child/webcrypto/webcrypto_impl.cc |
@@ -21,10 +21,17 @@ namespace { |
void CompleteWithError(const Status& status, blink::WebCryptoResult* result) { |
DCHECK(status.IsError()); |
+ |
+#if defined(WEBCRYPTO_HAS_ERROR_TYPE) |
+ result->completeWithError(status.error_type(), |
+ blink::WebString::fromUTF8(status.ToString())); |
+#else |
+ // TODO(eroman): Delete once Blink changes have rolled into Chromium. |
if (status.HasErrorDetails()) |
result->completeWithError(blink::WebString::fromUTF8(status.ToString())); |
else |
result->completeWithError(); |
+#endif |
} |
bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm) { |