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

Unified Diff: Source/modules/crypto/Crypto.cpp

Issue 19724003: Revert "Transition modules/** to use ExceptionState" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/modules/crypto/Crypto.h ('k') | Source/modules/crypto/CryptoOperation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Crypto.cpp
diff --git a/Source/modules/crypto/Crypto.cpp b/Source/modules/crypto/Crypto.cpp
index 6ad57e90e6fb19c211e6892cb7c37197b87bee19..85af72af6fc66dca62a5b2fdf61c8f964f4d77a8 100644
--- a/Source/modules/crypto/Crypto.cpp
+++ b/Source/modules/crypto/Crypto.cpp
@@ -30,7 +30,6 @@
#include "config.h"
#include "modules/crypto/Crypto.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "wtf/ArrayBufferView.h"
#include "wtf/CryptographicallyRandomNumber.h"
@@ -59,14 +58,14 @@ Crypto::Crypto()
}
// Note: This implementation must be thread-safe, as it is used by workers.
-void Crypto::getRandomValues(ArrayBufferView* array, ExceptionState& es)
+void Crypto::getRandomValues(ArrayBufferView* array, ExceptionCode& ec)
{
if (!array || !isIntegerArray(array)) {
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
return;
}
if (array->byteLength() > 65536) {
- es.throwDOMException(QuotaExceededError);
+ ec = QuotaExceededError;
return;
}
cryptographicallyRandomValues(array->baseAddress(), array->byteLength());
« no previous file with comments | « Source/modules/crypto/Crypto.h ('k') | Source/modules/crypto/CryptoOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698