Commit dacf56ce authored by vartul.k@samsung.com's avatar vartul.k@samsung.com

v8::Handle should be replaced with v8::Local in Source/bindings/modules

v8::Handle<T> is just an alias of v8::Local<T>

BUG=424445

Review URL: https://codereview.chromium.org/660243003

git-svn-id: svn://svn.chromium.org/blink/trunk@183938 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5882af00
......@@ -53,9 +53,9 @@
namespace blink {
static v8::Handle<v8::Value> deserializeIDBValueBuffer(v8::Isolate*, SharedBuffer*, const Vector<blink::WebBlobInfo>*);
static v8::Local<v8::Value> deserializeIDBValueBuffer(v8::Isolate*, SharedBuffer*, const Vector<blink::WebBlobInfo>*);
static v8::Handle<v8::Value> toV8(const IDBKeyPath& value, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
static v8::Local<v8::Value> toV8(const IDBKeyPath& value, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
switch (value.type()) {
case IDBKeyPath::NullType:
......@@ -72,7 +72,7 @@ static v8::Handle<v8::Value> toV8(const IDBKeyPath& value, v8::Handle<v8::Object
return v8::Undefined(isolate);
}
static v8::Handle<v8::Value> toV8(const IDBKey* key, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
static v8::Local<v8::Value> toV8(const IDBKey* key, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
if (!key) {
// This should be undefined, not null.
......@@ -106,7 +106,7 @@ static v8::Handle<v8::Value> toV8(const IDBKey* key, v8::Handle<v8::Object> crea
return v8Undefined();
}
static v8::Handle<v8::Value> toV8(const IDBAny* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
static v8::Local<v8::Value> toV8(const IDBAny* impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
if (!impl)
return v8::Null(isolate);
......@@ -121,8 +121,8 @@ static v8::Handle<v8::Value> toV8(const IDBAny* impl, v8::Handle<v8::Object> cre
case IDBAny::IDBCursorType: {
// Ensure request wrapper is kept alive at least as long as the cursor wrapper,
// so that event listeners are retained.
v8::Handle<v8::Value> cursor = toV8(impl->idbCursor(), creationContext, isolate);
v8::Handle<v8::Value> request = toV8(impl->idbCursor()->request(), creationContext, isolate);
v8::Local<v8::Value> cursor = toV8(impl->idbCursor(), creationContext, isolate);
v8::Local<v8::Value> request = toV8(impl->idbCursor()->request(), creationContext, isolate);
// FIXME: Due to race at worker shutdown, V8 may return empty handles.
if (!cursor.IsEmpty())
......@@ -132,8 +132,8 @@ static v8::Handle<v8::Value> toV8(const IDBAny* impl, v8::Handle<v8::Object> cre
case IDBAny::IDBCursorWithValueType: {
// Ensure request wrapper is kept alive at least as long as the cursor wrapper,
// so that event listeners are retained.
v8::Handle<v8::Value> cursor = toV8(impl->idbCursorWithValue(), creationContext, isolate);
v8::Handle<v8::Value> request = toV8(impl->idbCursorWithValue()->request(), creationContext, isolate);
v8::Local<v8::Value> cursor = toV8(impl->idbCursorWithValue(), creationContext, isolate);
v8::Local<v8::Value> request = toV8(impl->idbCursorWithValue()->request(), creationContext, isolate);
// FIXME: Due to race at worker shutdown, V8 may return empty handles.
if (!cursor.IsEmpty())
......@@ -159,8 +159,8 @@ static v8::Handle<v8::Value> toV8(const IDBAny* impl, v8::Handle<v8::Object> cre
case IDBAny::KeyPathType:
return toV8(impl->keyPath(), creationContext, isolate);
case IDBAny::BufferKeyAndKeyPathType: {
v8::Handle<v8::Value> value = deserializeIDBValueBuffer(isolate, impl->buffer(), impl->blobInfo());
v8::Handle<v8::Value> key = toV8(impl->key(), creationContext, isolate);
v8::Local<v8::Value> value = deserializeIDBValueBuffer(isolate, impl->buffer(), impl->blobInfo());
v8::Local<v8::Value> key = toV8(impl->key(), creationContext, isolate);
bool injected = injectV8KeyIntoV8Value(isolate, key, value, impl->keyPath());
ASSERT_UNUSED(injected, injected);
return value;
......@@ -173,7 +173,7 @@ static v8::Handle<v8::Value> toV8(const IDBAny* impl, v8::Handle<v8::Object> cre
static const size_t maximumDepth = 2000;
static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Handle<v8::Value> value, Vector<v8::Handle<v8::Array> >& stack, bool allowExperimentalTypes = false)
static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Local<v8::Value> value, Vector<v8::Local<v8::Array> >& stack, bool allowExperimentalTypes = false)
{
if (value->IsNumber() && !std::isnan(value->NumberValue()))
return IDBKey::createNumber(value->NumberValue());
......@@ -190,7 +190,7 @@ static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Handle<v8::Value>
return IDBKey::createBinary(SharedBuffer::create(start, length));
}
if (value->IsArray()) {
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(value);
v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(value);
if (stack.contains(array))
return 0;
......@@ -215,16 +215,16 @@ static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Handle<v8::Value>
return 0;
}
static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Handle<v8::Value> value, bool allowExperimentalTypes = false)
static IDBKey* createIDBKeyFromValue(v8::Isolate* isolate, v8::Local<v8::Value> value, bool allowExperimentalTypes = false)
{
Vector<v8::Handle<v8::Array> > stack;
Vector<v8::Local<v8::Array> > stack;
if (IDBKey* key = createIDBKeyFromValue(isolate, value, stack, allowExperimentalTypes))
return key;
return IDBKey::createInvalid();
}
template<typename T>
static bool getValueFrom(T indexOrName, v8::Handle<v8::Value>& v8Value)
static bool getValueFrom(T indexOrName, v8::Local<v8::Value>& v8Value)
{
v8::Local<v8::Object> object = v8Value->ToObject();
if (!object->Has(indexOrName))
......@@ -234,38 +234,38 @@ static bool getValueFrom(T indexOrName, v8::Handle<v8::Value>& v8Value)
}
template<typename T>
static bool setValue(v8::Handle<v8::Value>& v8Object, T indexOrName, const v8::Handle<v8::Value>& v8Value)
static bool setValue(v8::Local<v8::Value>& v8Object, T indexOrName, const v8::Local<v8::Value>& v8Value)
{
v8::Local<v8::Object> object = v8Object->ToObject();
return object->Set(indexOrName, v8Value);
}
static bool get(v8::Isolate* isolate, v8::Handle<v8::Value>& object, const String& keyPathElement, v8::Handle<v8::Value>& result)
static bool get(v8::Isolate* isolate, v8::Local<v8::Value>& object, const String& keyPathElement, v8::Local<v8::Value>& result)
{
if (object->IsString() && keyPathElement == "length") {
int32_t length = v8::Handle<v8::String>::Cast(object)->Length();
int32_t length = v8::Local<v8::String>::Cast(object)->Length();
result = v8::Number::New(isolate, length);
return true;
}
return object->IsObject() && getValueFrom(v8String(isolate, keyPathElement), result);
}
static bool canSet(v8::Handle<v8::Value>& object, const String& keyPathElement)
static bool canSet(v8::Local<v8::Value>& object, const String& keyPathElement)
{
return object->IsObject();
}
static bool set(v8::Isolate* isolate, v8::Handle<v8::Value>& object, const String& keyPathElement, const v8::Handle<v8::Value>& v8Value)
static bool set(v8::Isolate* isolate, v8::Local<v8::Value>& object, const String& keyPathElement, const v8::Local<v8::Value>& v8Value)
{
return canSet(object, keyPathElement) && setValue(object, v8String(isolate, keyPathElement), v8Value);
}
static v8::Handle<v8::Value> getNthValueOnKeyPath(v8::Isolate* isolate, v8::Handle<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
static v8::Local<v8::Value> getNthValueOnKeyPath(v8::Isolate* isolate, v8::Local<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
{
v8::Handle<v8::Value> currentValue(rootValue);
v8::Local<v8::Value> currentValue(rootValue);
ASSERT(index <= keyPathElements.size());
for (size_t i = 0; i < index; ++i) {
v8::Handle<v8::Value> parentValue(currentValue);
v8::Local<v8::Value> parentValue(currentValue);
if (!get(isolate, parentValue, keyPathElements[i], currentValue))
return v8Undefined();
}
......@@ -273,16 +273,16 @@ static v8::Handle<v8::Value> getNthValueOnKeyPath(v8::Isolate* isolate, v8::Hand
return currentValue;
}
static bool canInjectNthValueOnKeyPath(v8::Isolate* isolate, v8::Handle<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
static bool canInjectNthValueOnKeyPath(v8::Isolate* isolate, v8::Local<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
{
if (!rootValue->IsObject())
return false;
v8::Handle<v8::Value> currentValue(rootValue);
v8::Local<v8::Value> currentValue(rootValue);
ASSERT(index <= keyPathElements.size());
for (size_t i = 0; i < index; ++i) {
v8::Handle<v8::Value> parentValue(currentValue);
v8::Local<v8::Value> parentValue(currentValue);
const String& keyPathElement = keyPathElements[i];
if (!get(isolate, parentValue, keyPathElement, currentValue))
return canSet(parentValue, keyPathElement);
......@@ -291,16 +291,16 @@ static bool canInjectNthValueOnKeyPath(v8::Isolate* isolate, v8::Handle<v8::Valu
}
static v8::Handle<v8::Value> ensureNthValueOnKeyPath(v8::Isolate* isolate, v8::Handle<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
static v8::Local<v8::Value> ensureNthValueOnKeyPath(v8::Isolate* isolate, v8::Local<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
{
v8::Handle<v8::Value> currentValue(rootValue);
v8::Local<v8::Value> currentValue(rootValue);
ASSERT(index <= keyPathElements.size());
for (size_t i = 0; i < index; ++i) {
v8::Handle<v8::Value> parentValue(currentValue);
v8::Local<v8::Value> parentValue(currentValue);
const String& keyPathElement = keyPathElements[i];
if (!get(isolate, parentValue, keyPathElement, currentValue)) {
v8::Handle<v8::Object> object = v8::Object::New(isolate);
v8::Local<v8::Object> object = v8::Object::New(isolate);
if (!set(isolate, parentValue, keyPathElement, object))
return v8Undefined();
currentValue = object;
......@@ -319,8 +319,8 @@ static IDBKey* createIDBKeyFromScriptValueAndKeyPathInternal(v8::Isolate* isolat
ASSERT(isolate->InContext());
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> v8Value(value.v8Value());
v8::Handle<v8::Value> v8Key(getNthValueOnKeyPath(isolate, v8Value, keyPathElements, keyPathElements.size()));
v8::Local<v8::Value> v8Value(value.v8Value());
v8::Local<v8::Value> v8Key(getNthValueOnKeyPath(isolate, v8Value, keyPathElements, keyPathElements.size()));
if (v8Key.IsEmpty())
return 0;
return createIDBKeyFromValue(isolate, v8Key, allowExperimentalTypes);
......@@ -352,7 +352,7 @@ IDBKey* createIDBKeyFromScriptValueAndKeyPath(v8::Isolate* isolate, const Script
return createIDBKeyFromScriptValueAndKeyPathInternal(isolate, value, keyPath);
}
static v8::Handle<v8::Value> deserializeIDBValueBuffer(v8::Isolate* isolate, SharedBuffer* buffer, const Vector<blink::WebBlobInfo>* blobInfo)
static v8::Local<v8::Value> deserializeIDBValueBuffer(v8::Isolate* isolate, SharedBuffer* buffer, const Vector<blink::WebBlobInfo>* blobInfo)
{
ASSERT(isolate->InContext());
if (!buffer)
......@@ -365,7 +365,7 @@ static v8::Handle<v8::Value> deserializeIDBValueBuffer(v8::Isolate* isolate, Sha
return serializedValue->deserialize(isolate, 0, blobInfo);
}
bool injectV8KeyIntoV8Value(v8::Isolate* isolate, v8::Handle<v8::Value> key, v8::Handle<v8::Value> value, const IDBKeyPath& keyPath)
bool injectV8KeyIntoV8Value(v8::Isolate* isolate, v8::Local<v8::Value> key, v8::Local<v8::Value> value, const IDBKeyPath& keyPath)
{
IDB_TRACE("injectIDBV8KeyIntoV8Value");
ASSERT(isolate->InContext());
......@@ -380,7 +380,7 @@ bool injectV8KeyIntoV8Value(v8::Isolate* isolate, v8::Handle<v8::Value> key, v8:
return false;
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> parent(ensureNthValueOnKeyPath(isolate, value, keyPathElements, keyPathElements.size() - 1));
v8::Local<v8::Value> parent(ensureNthValueOnKeyPath(isolate, value, keyPathElements, keyPathElements.size() - 1));
if (parent.IsEmpty())
return false;
......@@ -402,7 +402,7 @@ bool canInjectIDBKeyIntoScriptValue(v8::Isolate* isolate, const ScriptValue& scr
if (!keyPathElements.size())
return false;
v8::Handle<v8::Value> v8Value(scriptValue.v8Value());
v8::Local<v8::Value> v8Value(scriptValue.v8Value());
return canInjectNthValueOnKeyPath(isolate, v8Value, keyPathElements, keyPathElements.size() - 1);
}
......@@ -410,7 +410,7 @@ ScriptValue idbAnyToScriptValue(ScriptState* scriptState, IDBAny* any)
{
v8::Isolate* isolate = scriptState->isolate();
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> v8Value(toV8(any, scriptState->context()->Global(), isolate));
v8::Local<v8::Value> v8Value(toV8(any, scriptState->context()->Global(), isolate));
return ScriptValue(scriptState, v8Value);
}
......@@ -418,7 +418,7 @@ ScriptValue idbKeyToScriptValue(ScriptState* scriptState, IDBKey* key)
{
v8::Isolate* isolate = scriptState->isolate();
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> v8Value(toV8(key, scriptState->context()->Global(), isolate));
v8::Local<v8::Value> v8Value(toV8(key, scriptState->context()->Global(), isolate));
return ScriptValue(scriptState, v8Value);
}
......@@ -426,14 +426,14 @@ IDBKey* scriptValueToIDBKey(v8::Isolate* isolate, const ScriptValue& scriptValue
{
ASSERT(isolate->InContext());
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> v8Value(scriptValue.v8Value());
v8::Local<v8::Value> v8Value(scriptValue.v8Value());
return createIDBKeyFromValue(isolate, v8Value);
}
IDBKeyRange* scriptValueToIDBKeyRange(v8::Isolate* isolate, const ScriptValue& scriptValue)
{
v8::HandleScope handleScope(isolate);
v8::Handle<v8::Value> value(scriptValue.v8Value());
v8::Local<v8::Value> value(scriptValue.v8Value());
return V8IDBKeyRange::toImplWithTypeCheck(isolate, value);
}
......
......@@ -42,7 +42,7 @@ class SharedBuffer;
class WebBlobInfo;
// Exposed for unit testing:
bool injectV8KeyIntoV8Value(v8::Isolate*, v8::Handle<v8::Value> key, v8::Handle<v8::Value>, const IDBKeyPath&);
bool injectV8KeyIntoV8Value(v8::Isolate*, v8::Local<v8::Value> key, v8::Local<v8::Value>, const IDBKeyPath&);
// For use by Source/modules/indexeddb:
IDBKey* createIDBKeyFromScriptValueAndKeyPath(v8::Isolate*, const ScriptValue&, const IDBKeyPath&);
......
......@@ -44,11 +44,11 @@ void V8Crypto::getRandomValuesMethodCustom(const v8::FunctionCallbackInfo<v8::Va
return;
}
v8::Handle<v8::Value> buffer = info[0];
v8::Local<v8::Value> buffer = info[0];
if (!V8ArrayBufferView::hasInstance(buffer, info.GetIsolate())) {
exceptionState.throwTypeError("First argument is not an ArrayBufferView");
} else {
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toImpl(v8::Handle<v8::Object>::Cast(buffer));
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(buffer));
ASSERT(arrayBufferView);
Crypto* crypto = V8Crypto::toImpl(info.Holder());
......
......@@ -15,7 +15,7 @@ namespace blink {
class DictionaryBuilder : public blink::WebCryptoKeyAlgorithmDictionary {
public:
DictionaryBuilder(v8::Handle<v8::Object> holder, v8::Isolate* isolate)
DictionaryBuilder(v8::Local<v8::Object> holder, v8::Isolate* isolate)
: m_holder(holder)
, m_isolate(isolate)
, m_dictionary(Dictionary::createEmpty(isolate))
......@@ -50,7 +50,7 @@ public:
const Dictionary& dictionary() const { return m_dictionary; }
private:
v8::Handle<v8::Object> m_holder;
v8::Local<v8::Object> m_holder;
v8::Isolate* m_isolate;
Dictionary m_dictionary;
};
......
......@@ -50,8 +50,8 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
ScriptState::Scope scope(m_scriptState.get());
v8::Handle<v8::Value> transactionHandle = toV8(transaction, m_scriptState->context()->Global(), isolate);
v8::Handle<v8::Value> errorHandle = toV8(error, m_scriptState->context()->Global(), isolate);
v8::Local<v8::Value> transactionHandle = toV8(transaction, m_scriptState->context()->Global(), isolate);
v8::Local<v8::Value> errorHandle = toV8(error, m_scriptState->context()->Global(), isolate);
if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) {
if (!isScriptControllerTerminating())
CRASH();
......@@ -60,7 +60,7 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
ASSERT(transactionHandle->IsObject());
v8::Handle<v8::Value> argv[] = {
v8::Local<v8::Value> argv[] = {
transactionHandle,
errorHandle
};
......@@ -68,7 +68,7 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
v8::TryCatch exceptionCatcher;
exceptionCatcher.SetVerbose(true);
v8::Handle<v8::Value> result = ScriptController::callFunction(executionContext(), m_callback.newLocal(isolate), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(argv), argv, isolate);
v8::Local<v8::Value> result = ScriptController::callFunction(executionContext(), m_callback.newLocal(isolate), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(argv), argv, isolate);
// FIXME: This comment doesn't make much sense given what the code is actually doing.
//
......
......@@ -69,7 +69,7 @@ void V8SQLResultSetRowList::itemMethodCustom(const v8::FunctionCallbackInfo<v8::
for (unsigned i = 0; i < numColumns; ++i) {
const SQLValue& sqlValue = rowList->values()[valuesIndex + i];
v8::Handle<v8::Value> value;
v8::Local<v8::Value> value;
switch (sqlValue.type()) {
case SQLValue::StringValue:
value = v8String(info.GetIsolate(), sqlValue.string());
......
......@@ -74,7 +74,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
sqlArgsLength = length->Uint32Value();
for (unsigned i = 0; i < sqlArgsLength; ++i) {
v8::Handle<v8::Integer> key = v8::Integer::New(info.GetIsolate(), i);
v8::Local<v8::Integer> key = v8::Integer::New(info.GetIsolate(), i);
TONATIVE_VOID(v8::Local<v8::Value>, value, sqlArgsObject->Get(key));
if (value.IsEmpty() || value->IsNull()) {
......@@ -97,7 +97,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
exceptionState.throwIfNeeded();
return;
}
callback = V8SQLStatementCallback::create(v8::Handle<v8::Function>::Cast(info[2]), ScriptState::current(info.GetIsolate()));
callback = V8SQLStatementCallback::create(v8::Local<v8::Function>::Cast(info[2]), ScriptState::current(info.GetIsolate()));
} else {
callback = nullptr;
}
......@@ -109,7 +109,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
exceptionState.throwIfNeeded();
return;
}
errorCallback = V8SQLStatementErrorCallback::create(v8::Handle<v8::Function>::Cast(info[3]), ScriptState::current(info.GetIsolate()));
errorCallback = V8SQLStatementErrorCallback::create(v8::Local<v8::Function>::Cast(info[3]), ScriptState::current(info.GetIsolate()));
} else {
errorCallback = nullptr;
}
......
......@@ -27,8 +27,8 @@ void verify1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
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);
TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[2])) : 0);
TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[3])) : 0);
v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
}
......@@ -42,8 +42,8 @@ void verify2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
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);
TONATIVE_VOID(ArrayBuffer*, signature, info[2]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[2])) : 0);
TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Local<v8::ArrayBufferView>::Cast(info[3])) : 0);
v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
}
......@@ -57,8 +57,8 @@ void verify3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
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);
TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Local<v8::ArrayBufferView>::Cast(info[2])) : 0);
TONATIVE_VOID(ArrayBuffer*, data, info[3]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[3])) : 0);
v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
}
......@@ -72,8 +72,8 @@ void verify4Method(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
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);
TONATIVE_VOID(ArrayBufferView*, signature, info[2]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Local<v8::ArrayBufferView>::Cast(info[2])) : 0);
TONATIVE_VOID(ArrayBufferView*, data, info[3]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Local<v8::ArrayBufferView>::Cast(info[3])) : 0);
v8SetReturnValue(info, impl->verifySignature(ScriptState::current(info.GetIsolate()), algorithm, key, signature, data).v8Value());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment