Chromium Code Reviews| Index: Source/bindings/v8/custom/V8CryptoCustom.cpp |
| diff --git a/Source/bindings/v8/custom/V8CryptoCustom.cpp b/Source/bindings/v8/custom/V8CryptoCustom.cpp |
| index 1149c4fb7f75421f621dce5576bd2936433221f1..1d44dee57fe00ac4bfb6899c7a4a4bb4affea5ca 100644 |
| --- a/Source/bindings/v8/custom/V8CryptoCustom.cpp |
| +++ b/Source/bindings/v8/custom/V8CryptoCustom.cpp |
| @@ -35,6 +35,9 @@ |
| namespace WebCore { |
| +// This custom binding is shared by V8WorkerCrypto. As such: |
| +// * Do not call V8Crypto::toNative() |
| +// * Must be threadsafe |
|
abarth-chromium
2013/06/13 21:48:33
It's too bad the code generator isn't smart enough
|
| void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| if (args.Length() < 1) { |
| @@ -51,9 +54,8 @@ 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()); |
| ExceptionCode ec = 0; |
| - crypto->getRandomValues(arrayBufferView, ec); |
| + Crypto::getRandomValues(arrayBufferView, ec); |
| if (ec) { |
| setDOMException(ec, args.GetIsolate()); |