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

Unified Diff: Source/bindings/v8/custom/V8RandomSourceCustom.cpp

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
Index: Source/bindings/v8/custom/V8RandomSourceCustom.cpp
diff --git a/Source/bindings/v8/custom/V8CryptoCustom.cpp b/Source/bindings/v8/custom/V8RandomSourceCustom.cpp
similarity index 89%
rename from Source/bindings/v8/custom/V8CryptoCustom.cpp
rename to Source/bindings/v8/custom/V8RandomSourceCustom.cpp
index 1149c4fb7f75421f621dce5576bd2936433221f1..becc2b0e414e055d9174a62d35981541059ae677 100644
--- a/Source/bindings/v8/custom/V8CryptoCustom.cpp
+++ b/Source/bindings/v8/custom/V8RandomSourceCustom.cpp
@@ -23,7 +23,7 @@
*/
#include "config.h"
-#include "V8Crypto.h"
+#include "V8RandomSource.h"
#include "V8ArrayBufferView.h"
#include "bindings/v8/V8Binding.h"
@@ -35,7 +35,7 @@
namespace WebCore {
-void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8RandomSource::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
@@ -51,9 +51,9 @@ void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Va
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(buffer));
ASSERT(arrayBufferView);
- Crypto* crypto = V8Crypto::toNative(args.Holder());
+ RandomSource* randomSource = V8RandomSource::toNative(args.Holder());
ExceptionCode ec = 0;
- crypto->getRandomValues(arrayBufferView, ec);
+ randomSource->getRandomValues(arrayBufferView, ec);
if (ec) {
setDOMException(ec, args.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698