| Index: Source/modules/crypto/Key.cpp
|
| diff --git a/Source/modules/crypto/Key.cpp b/Source/modules/crypto/Key.cpp
|
| index e8080950df1cca5104422095cbd392f226f89359..e4e00e6b5a4cbb8aa0119aeefa9c0b68b12c5db6 100644
|
| --- a/Source/modules/crypto/Key.cpp
|
| +++ b/Source/modules/crypto/Key.cpp
|
| @@ -175,15 +175,15 @@ Vector<String> Key::usages() const
|
| return result;
|
| }
|
|
|
| -bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, AlgorithmOperation op, ExceptionState& es) const
|
| +bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, AlgorithmOperation op, ExceptionState& exceptionState) const
|
| {
|
| if (!(m_key.usages() & toKeyUsage(op))) {
|
| - es.throwDOMException(NotSupportedError, "key.usages does not permit this operation");
|
| + exceptionState.throwDOMException(NotSupportedError, "key.usages does not permit this operation");
|
| return false;
|
| }
|
|
|
| if (m_key.algorithm().id() != algorithm.id()) {
|
| - es.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation");
|
| + exceptionState.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation");
|
| return false;
|
| }
|
|
|
| @@ -194,7 +194,7 @@ bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, Algo
|
| blink::WebCryptoAlgorithmId keyHash;
|
| blink::WebCryptoAlgorithmId algorithmHash;
|
| if (!getHmacHashId(m_key.algorithm(), keyHash) || !getHmacHashId(algorithm, algorithmHash) || keyHash != algorithmHash) {
|
| - es.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation (HMAC's hash differs)");
|
| + exceptionState.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation (HMAC's hash differs)");
|
| return false;
|
| }
|
| }
|
| @@ -202,7 +202,7 @@ bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, Algo
|
| return true;
|
| }
|
|
|
| -bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& format, ExceptionState& es)
|
| +bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& format, ExceptionState& exceptionState)
|
| {
|
| // There are few enough values that testing serially is fast enough.
|
| if (formatString == "raw") {
|
| @@ -222,17 +222,17 @@ bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& for
|
| return true;
|
| }
|
|
|
| - es.throwTypeError("Invalid keyFormat argument");
|
| + exceptionState.throwTypeError("Invalid keyFormat argument");
|
| return false;
|
| }
|
|
|
| -bool Key::parseUsageMask(const Vector<String>& usages, blink::WebCryptoKeyUsageMask& mask, ExceptionState& es)
|
| +bool Key::parseUsageMask(const Vector<String>& usages, blink::WebCryptoKeyUsageMask& mask, ExceptionState& exceptionState)
|
| {
|
| mask = 0;
|
| for (size_t i = 0; i < usages.size(); ++i) {
|
| blink::WebCryptoKeyUsageMask usage = keyUsageStringToMask(usages[i]);
|
| if (!usage) {
|
| - es.throwTypeError("Invalid keyUsages argument");
|
| + exceptionState.throwTypeError("Invalid keyUsages argument");
|
| return false;
|
| }
|
| mask |= usage;
|
|
|