aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8include.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-05-06 15:57:06 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-05-06 16:10:21 +0200
commit8b5fbb56299851896fbcf136bdcfdcd4487484b5 (patch)
tree16a5a586d2dbe0b8e6d60b0ba76803dcce2560db /src/qml/qml/v8/qv8include.cpp
parent19c6f620dd35916466c36234231d798f79732ab0 (diff)
Get rid of v8::Local
The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/v8/qv8include.cpp')
-rw-r--r--src/qml/qml/v8/qv8include.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/v8/qv8include.cpp b/src/qml/qml/v8/qv8include.cpp
index fc59093a0f..f37ed73ee5 100644
--- a/src/qml/qml/v8/qv8include.cpp
+++ b/src/qml/qml/v8/qv8include.cpp
@@ -78,10 +78,10 @@ QV8Include::~QV8Include()
qPersistentDispose(m_resultObject);
}
-v8::Local<v8::Object> QV8Include::resultValue(Status status)
+v8::Handle<v8::Object> QV8Include::resultValue(Status status)
{
// XXX It seems inefficient to create this object from scratch each time.
- v8::Local<v8::Object> result = v8::Object::New();
+ v8::Handle<v8::Object> result = v8::Object::New();
result->Set(v8::String::New("OK"), v8::Integer::New(Ok));
result->Set(v8::String::New("LOADING"), v8::Integer::New(Loading));
result->Set(v8::String::New("NETWORK_ERROR"), v8::Integer::New(NetworkError));
@@ -141,7 +141,7 @@ void QV8Include::finished()
v8::TryCatch try_catch;
- v8::Local<v8::Script> script = m_engine->qmlModeCompile(code, m_url.toString());
+ v8::Handle<v8::Script> script = m_engine->qmlModeCompile(code, m_url.toString());
if (!try_catch.HasCaught()) {
m_engine->contextWrapper()->addSubContext(m_qmlglobal, script, importContext);
@@ -180,20 +180,20 @@ v8::Handle<v8::Value> QV8Include::include(const v8::Arguments &args)
QUrl url(context->resolvedUrl(QUrl(args[0]->v4Value().toQString())));
- v8::Local<v8::Function> callbackFunction;
+ v8::Handle<v8::Function> callbackFunction;
if (args.Length() >= 2 && args[1]->IsFunction())
- callbackFunction = v8::Local<v8::Function>::Cast(args[1]);
+ callbackFunction = v8::Handle<v8::Function>::Cast(args[1]);
QString localFile = QQmlFile::urlToLocalFileOrQrc(url);
- v8::Local<v8::Object> result;
+ v8::Handle<v8::Object> result;
if (localFile.isEmpty()) {
QV8Include *i = new QV8Include(url, engine, context,
QV4::Value::fromObject(args.GetIsolate()->GetEngine()->qmlContextObject()),
callbackFunction);
- result = v8::Local<v8::Object>::New(i->result());
+ result = i->result();
} else {
@@ -212,7 +212,7 @@ v8::Handle<v8::Value> QV8Include::include(const v8::Arguments &args)
v8::TryCatch try_catch;
- v8::Local<v8::Script> script = engine->qmlModeCompile(code, url.toString());
+ v8::Handle<v8::Script> script = engine->qmlModeCompile(code, url.toString());
if (!try_catch.HasCaught()) {
v8::Handle<v8::Object> qmlglobal = QV4::Value::fromObject(args.GetIsolate()->GetEngine()->qmlContextObject());