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
......@@ -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