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

Unified Diff: Source/bindings/v8/custom/V8CryptoCustom.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 | « no previous file | Source/bindings/v8/custom/V8SQLTransactionCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8CryptoCustom.cpp
diff --git a/Source/bindings/v8/custom/V8CryptoCustom.cpp b/Source/bindings/v8/custom/V8CryptoCustom.cpp
index de6a2c39df214b5f5e1c52fbe491b7e2523d6456..1d44dee57fe00ac4bfb6899c7a4a4bb4affea5ca 100644
--- a/Source/bindings/v8/custom/V8CryptoCustom.cpp
+++ b/Source/bindings/v8/custom/V8CryptoCustom.cpp
@@ -26,9 +26,9 @@
#include "V8Crypto.h"
#include "V8ArrayBufferView.h"
-#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8Utilities.h"
+#include "core/dom/ExceptionCode.h"
#include "modules/crypto/Crypto.h"
#include "wtf/ArrayBufferView.h"
@@ -54,11 +54,13 @@ void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Va
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(buffer));
ASSERT(arrayBufferView);
- ExceptionState es(args.GetIsolate());
- Crypto::getRandomValues(arrayBufferView, es);
+ ExceptionCode ec = 0;
+ Crypto::getRandomValues(arrayBufferView, ec);
- if (es.throwIfNeeded())
+ if (ec) {
+ setDOMException(ec, args.GetIsolate());
return;
+ }
v8SetReturnValue(args, buffer);
}
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8SQLTransactionCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698