diff options
-rw-r--r-- | src/qml/qml/v8/qjsvalue_impl_p.h | 16 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8qobjectwrapper.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8sequencewrapper.cpp | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/qml/qml/v8/qjsvalue_impl_p.h b/src/qml/qml/v8/qjsvalue_impl_p.h index 2e779c22e9..b124c60cc8 100644 --- a/src/qml/qml/v8/qjsvalue_impl_p.h +++ b/src/qml/qml/v8/qjsvalue_impl_p.h @@ -372,7 +372,7 @@ inline bool QJSValuePrivate::isCallable() const return true; if (isObject()) { // Our C++ wrappers register function handlers but not always act as callables. - return v8::Object::Cast(*m_value)->IsCallable(); + return v8::Object::Cast(m_value.get())->IsCallable(); } return false; } @@ -592,7 +592,7 @@ inline void QJSValuePrivate::setProperty(v8::Handle<v8::String> name, QJSValuePr // if (attribs & (QJSValue::PropertyGetter | QJSValue::PropertySetter)) { // engine()->originalGlobalObject()->defineGetterOrSetter(*this, name, value->m_value, attribs); // } else { - v8::Object::Cast(*m_value)->Set(name, value->m_value, v8::PropertyAttribute(attribs & QJSConverter::PropertyAttributeMask)); + v8::Object::Cast(m_value.get())->Set(name, value->m_value, v8::PropertyAttribute(attribs & QJSConverter::PropertyAttributeMask)); // } } @@ -620,7 +620,7 @@ inline void QJSValuePrivate::setProperty(quint32 index, QJSValuePrivate* value, } v8::HandleScope handleScope; - v8::Object::Cast(*m_value)->Set(index, value->m_value); + v8::Object::Cast(m_value.get())->Set(index, value->m_value); } inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::property(const QString& name) const @@ -654,7 +654,7 @@ inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::property(T name) con { Q_ASSERT(isObject()); v8::HandleScope handleScope; - v8::Handle<v8::Object> self(v8::Object::Cast(*m_value)); + v8::Handle<v8::Object> self(v8::Object::Cast(m_value.get())); v8::TryCatch tryCatch; v8::Handle<v8::Value> result = self->Get(name); @@ -738,14 +738,14 @@ QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::call(QJSValuePrivate* thisO v8::Handle<v8::Object> recv; if (!thisObject || !thisObject->isObject()) { - recv = v8::Handle<v8::Object>(v8::Object::Cast(*e->global())); + recv = v8::Handle<v8::Object>(v8::Object::Cast(e->global().get())); } else { if (!thisObject->assignEngine(e)) { qWarning("QJSValue::call() failed: cannot call function with thisObject created in a different engine"); return new QJSValuePrivate(engine()); } - recv = v8::Handle<v8::Object>(v8::Object::Cast(*thisObject->m_value)); + recv = v8::Handle<v8::Object>(v8::Object::Cast(thisObject->m_value.get())); } if (argc < 0) { @@ -754,7 +754,7 @@ QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::call(QJSValuePrivate* thisO } v8::TryCatch tryCatch; - v8::Handle<v8::Value> result = v8::Object::Cast(*m_value)->CallAsFunction(recv, argc, argv); + v8::Handle<v8::Value> result = v8::Object::Cast(m_value.get())->CallAsFunction(recv, argc, argv); if (result.IsEmpty()) { result = tryCatch.Exception(); @@ -777,7 +777,7 @@ inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::callAsConstructor(in } v8::TryCatch tryCatch; - v8::Handle<v8::Value> result = v8::Object::Cast(*m_value)->CallAsConstructor(argc, argv); + v8::Handle<v8::Value> result = v8::Object::Cast(m_value.get())->CallAsConstructor(argc, argv); if (result.IsEmpty()) result = tryCatch.Exception(); diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index e80da46fc9..5cb9b61e8f 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -1451,7 +1451,7 @@ int QV8Engine::consoleCountHelper(const QString &file, quint16 line, quint16 col v8::Handle<v8::Value> QV8Engine::getPlatform(v8::Local<v8::String>, const v8::AccessorInfo &info) { - QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(*info.Data())->Value()); + QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(info.Data().get())->Value()); if (!engine->m_platform) { // Only allocate a platform object once engine->m_platform = new QQmlPlatform(engine->m_engine); @@ -1461,7 +1461,7 @@ v8::Handle<v8::Value> QV8Engine::getPlatform(v8::Local<v8::String>, const v8::Ac v8::Handle<v8::Value> QV8Engine::getApplication(v8::Local<v8::String>, const v8::AccessorInfo &info) { - QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(*info.Data())->Value()); + QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(info.Data().get())->Value()); if (!engine->m_application) { // Only allocate an application object once engine->m_application = QQml_guiProvider()->application(engine->m_engine); @@ -1472,7 +1472,7 @@ v8::Handle<v8::Value> QV8Engine::getApplication(v8::Local<v8::String>, const v8: #ifndef QT_NO_IM v8::Handle<v8::Value> QV8Engine::getInputMethod(v8::Local<v8::String>, const v8::AccessorInfo &info) { - QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(*info.Data())->Value()); + QV8Engine *engine = reinterpret_cast<QV8Engine*>(v8::External::Cast(info.Data().get())->Value()); return engine->newQObject(QQml_guiProvider()->inputMethod(), CppOwnership); } #endif diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 9f06ee2c56..d7941487e3 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE // a handle, qFatal() is called. // #define QML_GLOBAL_HANDLE_DEBUGGING -#define V8ENGINE() ((QV8Engine *)v8::External::Cast(*args.Data())->Value()) +#define V8ENGINE() ((QV8Engine *)v8::External::Cast(args.Data().get())->Value()) #define V8FUNCTION(function, engine) v8::FunctionTemplate::New(function, v8::External::New((QV8Engine*)engine))->GetFunction() #define V8THROW_ERROR(string) { \ v8::ThrowException(v8::Exception::Error(v8::String::New(string))); \ @@ -112,7 +112,7 @@ QT_BEGIN_NAMESPACE v8::ThrowException(v8::Exception::TypeError(v8::String::New(string))); \ return v8::Handle<v8::Value>(); \ } -#define V8ENGINE_ACCESSOR() ((QV8Engine *)v8::External::Cast(*info.Data())->Value()); +#define V8ENGINE_ACCESSOR() ((QV8Engine *)v8::External::Cast(info.Data().get())->Value()); #define V8THROW_ERROR_SETTER(string) { \ v8::ThrowException(v8::Exception::Error(v8::String::New(string))); \ return; \ diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index 0982f177d3..92e00f05da 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -277,7 +277,7 @@ static v8::Handle<v8::Value> GenericValueGetter(v8::Local<v8::String>, const v8: if (QQmlData::wasDeleted(object)) return v8::Undefined(); QQmlPropertyData *property = - (QQmlPropertyData *)v8::External::Cast(*info.Data())->Value(); + (QQmlPropertyData *)v8::External::Cast(info.Data().get())->Value(); QQmlEngine *engine = resource->engine->engine(); QQmlEnginePrivate *ep = engine?QQmlEnginePrivate::get(engine):0; @@ -894,7 +894,7 @@ static void FastValueSetter(v8::Local<v8::String>, v8::Local<v8::Value> value, QObject *object = resource->object; QQmlPropertyData *property = - (QQmlPropertyData *)v8::External::Cast(*info.Data())->Value(); + (QQmlPropertyData *)v8::External::Cast(info.Data().get())->Value(); int index = property->coreIndex; diff --git a/src/qml/qml/v8/qv8sequencewrapper.cpp b/src/qml/qml/v8/qv8sequencewrapper.cpp index b1e0c41771..a30af7d75a 100644 --- a/src/qml/qml/v8/qv8sequencewrapper.cpp +++ b/src/qml/qml/v8/qv8sequencewrapper.cpp @@ -77,7 +77,7 @@ void QV8SequenceWrapper::init(QV8Engine *engine) m_sort = qPersistentNew<v8::Function>(v8::FunctionTemplate::New(Sort)->GetFunction()); m_arrayPrototype = qPersistentNew<v8::Value>(v8::Array::New(1)->GetPrototype()); v8::Local<v8::Script> defaultSortCompareScript = v8::Script::Compile(engine->toString(defaultSortString)); - m_defaultSortComparer = qPersistentNew<v8::Function>(v8::Handle<v8::Function>(v8::Function::Cast(*defaultSortCompareScript->Run()))); + m_defaultSortComparer = qPersistentNew<v8::Function>(v8::Handle<v8::Function>(v8::Function::Cast(defaultSortCompareScript->Run().get()))); v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetFallbackPropertyHandler(Getter, Setter); @@ -277,7 +277,7 @@ v8::Handle<v8::Value> QV8SequenceWrapper::Sort(const v8::Arguments &args) if (length > 1) { v8::Handle<v8::Function> jsCompareFn = sr->engine->sequenceWrapper()->m_defaultSortComparer; if (argCount == 1 && args[0]->IsFunction()) - jsCompareFn = v8::Handle<v8::Function>(v8::Function::Cast(*args[0])); + jsCompareFn = v8::Handle<v8::Function>(v8::Function::Cast(args[0].get())); sr->sort(jsCompareFn); } |