| Index: Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp
|
| diff --git a/Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp b/Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp
|
| index 379dcd06928d26fe3466b23629ec82ec5b69c4f6..990562796a620ebaf4ecc9f8cde27206ce6ac82a 100644
|
| --- a/Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp
|
| +++ b/Source/bindings/modules/v8/custom/V8SubtleCryptoCustom.cpp
|
| @@ -20,60 +20,60 @@ namespace blink {
|
| // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBuffer signature, ArrayBuffer data);
|
| void verify1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - SubtleCrypto* impl = V8SubtleCrypto::toNative(info.Holder());
|
| + SubtleCrypto* impl = V8SubtleCrypto::toImpl(info.Holder());
|
| TONATIVE_VOID(Dictionary, algorithm, Dictionary(info[0], info.GetIsolate()));
|
| if (!algorithm.isUndefinedOrNull() && !algorithm.isObject()) {
|
| V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("verify", "SubtleCrypto", "parameter 1 ('algorithm') is not an object."), info.GetIsolate());
|
| return;
|
| }
|
| - TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
|
| - TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[2])) : 0);
|
| - TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[3])) : 0);
|
| + TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toImplWithTypeCheck(info.GetIsolate(), info[1]));
|
| + TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[2])) : 0);
|
| + TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[3])) : 0);
|
| v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
|
| }
|
|
|
| // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBuffer signature, ArrayBufferView data);
|
| void verify2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - SubtleCrypto* impl = V8SubtleCrypto::toNative(info.Holder());
|
| + SubtleCrypto* impl = V8SubtleCrypto::toImpl(info.Holder());
|
| TONATIVE_VOID(Dictionary, algorithm, Dictionary(info[0], info.GetIsolate()));
|
| if (!algorithm.isUndefinedOrNull() && !algorithm.isObject()) {
|
| V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("verify", "SubtleCrypto", "parameter 1 ('algorithm') is not an object."), info.GetIsolate());
|
| return;
|
| }
|
| - TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
|
| - TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[2])) : 0);
|
| - TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[3])) : 0);
|
| + TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toImplWithTypeCheck(info.GetIsolate(), info[1]));
|
| + TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[2])) : 0);
|
| + TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[3])) : 0);
|
| v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
|
| }
|
|
|
| // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBufferView signature, ArrayBuffer data);
|
| void verify3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - SubtleCrypto* impl = V8SubtleCrypto::toNative(info.Holder());
|
| + SubtleCrypto* impl = V8SubtleCrypto::toImpl(info.Holder());
|
| TONATIVE_VOID(Dictionary, algorithm, Dictionary(info[0], info.GetIsolate()));
|
| if (!algorithm.isUndefinedOrNull() && !algorithm.isObject()) {
|
| V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("verify", "SubtleCrypto", "parameter 1 ('algorithm') is not an object."), info.GetIsolate());
|
| return;
|
| }
|
| - TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
|
| - TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[2])) : 0);
|
| - TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[3])) : 0);
|
| + TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toImplWithTypeCheck(info.GetIsolate(), info[1]));
|
| + TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[2])) : 0);
|
| + TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[3])) : 0);
|
| v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
|
| }
|
|
|
| // Promise verify(Dictionary algorithm, CryptoKey key, ArrayBufferView signature, ArrayBufferView data);
|
| void verify4Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - SubtleCrypto* impl = V8SubtleCrypto::toNative(info.Holder());
|
| + SubtleCrypto* impl = V8SubtleCrypto::toImpl(info.Holder());
|
| TONATIVE_VOID(Dictionary, algorithm, Dictionary(info[0], info.GetIsolate()));
|
| if (!algorithm.isUndefinedOrNull() && !algorithm.isObject()) {
|
| V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("verify", "SubtleCrypto", "parameter 1 ('algorithm') is not an object."), info.GetIsolate());
|
| return;
|
| }
|
| - TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
|
| - TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[2])) : 0);
|
| - TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[3])) : 0);
|
| + TONATIVE_VOID(CryptoKey*, key, V8CryptoKey::toImplWithTypeCheck(info.GetIsolate(), info[1]));
|
| + TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[2])) : 0);
|
| + TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[3])) : 0);
|
| v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
|
| }
|
|
|
|
|