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

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

Issue 1480063002: Drop [LegacyInterfaceTypeChecking] for the Crypto API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 5 years, 1 month 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
Index: third_party/WebKit/Source/modules/crypto/Crypto.cpp
diff --git a/third_party/WebKit/Source/modules/crypto/Crypto.cpp b/third_party/WebKit/Source/modules/crypto/Crypto.cpp
index b535622a0d6f4547db88d4a9b2c0a505317ff457..4ac57bf195ac817d3b7984ac2724076787b59be3 100644
--- a/third_party/WebKit/Source/modules/crypto/Crypto.cpp
+++ b/third_party/WebKit/Source/modules/crypto/Crypto.cpp
@@ -55,10 +55,7 @@ bool isIntegerArray(DOMArrayBufferView* array)
DOMArrayBufferView* Crypto::getRandomValues(DOMArrayBufferView* array, ExceptionState& exceptionState)
{
- if (!array) {
- exceptionState.throwDOMException(TypeMismatchError, "The provided ArrayBufferView is null.");
- return nullptr;
- }
+ ASSERT(array);
if (!isIntegerArray(array)) {
exceptionState.throwDOMException(TypeMismatchError, String::format("The provided ArrayBufferView is of type '%s', which is not an integer array type.", array->typeName()));
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698