Index: Source/bindings/v8/custom/V8CryptoCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8CryptoCustom.cpp b/Source/bindings/v8/custom/V8CryptoCustom.cpp |
index f43b55285c735e7f69c20aeac703ae7ea2c9bbbc..ac7e1be62e0bf1f4ce825981a69fc303573496a4 100644 |
--- a/Source/bindings/v8/custom/V8CryptoCustom.cpp |
+++ b/Source/bindings/v8/custom/V8CryptoCustom.cpp |
@@ -35,9 +35,6 @@ |
namespace WebCore { |
-// This custom binding is shared by V8WorkerCrypto. As such: |
-// * Do not call V8Crypto::toNative() |
-// * Must be threadsafe |
void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getRandomValues", "Crypto", info.Holder(), info.GetIsolate()); |
@@ -54,7 +51,8 @@ void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Va |
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(buffer)); |
ASSERT(arrayBufferView); |
- Crypto::getRandomValues(arrayBufferView, exceptionState); |
+ Crypto* crypto = V8Crypto::toNative(info.Holder()); |
+ crypto->getRandomValues(arrayBufferView, exceptionState); |
} |
if (exceptionState.throwIfNeeded()) |