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

Unified Diff: Source/modules/crypto/NormalizeAlgorithm.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/NormalizeAlgorithm.h ('k') | Source/modules/crypto/SubtleCrypto.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/NormalizeAlgorithm.cpp
diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp
index 7e9657b72e5cb474b770164247aa630f9b058f8c..fa4c3e1bb76642a8867c88b95201507abfb5f6a3 100644
--- a/Source/modules/crypto/NormalizeAlgorithm.cpp
+++ b/Source/modules/crypto/NormalizeAlgorithm.cpp
@@ -32,7 +32,6 @@
#include "modules/crypto/NormalizeAlgorithm.h"
#include "bindings/v8/Dictionary.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "public/platform/WebCryptoAlgorithm.h"
#include "public/platform/WebCryptoAlgorithmParams.h"
@@ -194,27 +193,27 @@ PassOwnPtr<WebKit::WebCryptoAlgorithmParams> parseAlgorithmParams(const Dictiona
// FIXME: Throw the correct exception types!
// This implementation corresponds with:
// http://www.w3.org/TR/WebCryptoAPI/#algorithm-normalizing-rules
-bool normalizeAlgorithm(const Dictionary& raw, AlgorithmOperation op, WebKit::WebCryptoAlgorithm& algorithm, ExceptionState& es)
+bool normalizeAlgorithm(const Dictionary& raw, AlgorithmOperation op, WebKit::WebCryptoAlgorithm& algorithm, ExceptionCode& ec)
{
String algorithmName;
if (!raw.get("name", algorithmName)) {
- es.throwDOMException(NotSupportedError);
+ ec = NotSupportedError;
return false;
}
if (!algorithmName.containsOnlyASCII()) {
- es.throwDOMException(SyntaxError);
+ ec = SyntaxError;
return false;
}
const AlgorithmInfo* info = AlgorithmRegistry::lookupAlgorithmByName(algorithmName);
if (!info) {
- es.throwDOMException(NotSupportedError);
+ ec = NotSupportedError;
return false;
}
if (info->paramsForOperation[op] == UnsupportedOp) {
- es.throwDOMException(NotSupportedError);
+ ec = NotSupportedError;
return false;
}
@@ -222,7 +221,7 @@ bool normalizeAlgorithm(const Dictionary& raw, AlgorithmOperation op, WebKit::We
OwnPtr<WebKit::WebCryptoAlgorithmParams> params = parseAlgorithmParams(raw, paramsType);
if (!params && paramsType != WebKit::WebCryptoAlgorithmParamsTypeNone) {
- es.throwDOMException(NotSupportedError);
+ ec = NotSupportedError;
return false;
}
« no previous file with comments | « Source/modules/crypto/NormalizeAlgorithm.h ('k') | Source/modules/crypto/SubtleCrypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698