diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-03 14:14:57 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-03 14:40:38 +0200 |
commit | e537722604e41577dbf5625a35542a88d2576d63 (patch) | |
tree | 8dcade24c43e2e02fe5d01f3ec161621cc28fc52 /src | |
parent | bf51873870f94f56e8dccf25fea67b120f2db98f (diff) |
Remove v8::HandleScope
This class never made sense with v4... :)
Change-Id: Id597d791d1adf52cc821d6d46f57cb24d1acd343
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
28 files changed, 0 insertions, 99 deletions
diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp index 23a1f6db50..9c46510091 100644 --- a/src/particles/qquickcustomaffector.cpp +++ b/src/particles/qquickcustomaffector.cpp @@ -143,7 +143,6 @@ void QQuickCustomAffector::affectSystem(qreal dt) if (m_onceOff) dt = 1.0; - v8::HandleScope handle_scope; v8::Handle<v8::Array> array = v8::Array::New(toAffect.size()); for (int i=0; i<toAffect.size(); i++) array->Set(i, toAffect[i]->v8Value().toV8Handle()); diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp index e9e748d4d8..d3a7adb1a8 100644 --- a/src/particles/qquickparticleemitter.cpp +++ b/src/particles/qquickparticleemitter.cpp @@ -479,7 +479,6 @@ void QQuickParticleEmitter::emitWindow(int timeStamp) if (isEmitConnected()) { //Done after emitParticle so that the Painter::load is done first, this allows you to customize its static variables //We then don't need to request another reload, because the first reload isn't scheduled until we get back to the render thread - v8::HandleScope handle_scope; v8::Handle<v8::Array> array = v8::Array::New(toEmit.size()); for (int i=0; i<toEmit.size(); i++) array->Set(i, toEmit[i]->v8Value().toV8Handle()); diff --git a/src/particles/qquicktrailemitter.cpp b/src/particles/qquicktrailemitter.cpp index aca11f114e..c0e65e52e4 100644 --- a/src/particles/qquicktrailemitter.cpp +++ b/src/particles/qquicktrailemitter.cpp @@ -269,7 +269,6 @@ void QQuickTrailEmitter::emitWindow(int timeStamp) m_system->emitParticle(d); if (isEmitConnected() || isEmitFollowConnected()) { - v8::HandleScope handle_scope; v8::Handle<v8::Array> array = v8::Array::New(toEmit.size()); for (int i=0; i<toEmit.size(); i++) array->Set(i, toEmit[i]->v8Value().toV8Handle()); diff --git a/src/particles/qquickv8particledata.cpp b/src/particles/qquickv8particledata.cpp index 4ca01e0a08..5389d441a0 100644 --- a/src/particles/qquickv8particledata.cpp +++ b/src/particles/qquickv8particledata.cpp @@ -426,8 +426,6 @@ FAKE_FLOAT_GETTER_AND_SETTER(curAY, curAY, setInstantaneousAY) QV8ParticleDataDeletable::QV8ParticleDataDeletable(QV8Engine *engine) { - v8::HandleScope handle_scope; - v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetHasExternalResource(true); ft->PrototypeTemplate()->Set(v8::String::New("discard"), V8FUNCTION(particleData_discard, engine)); @@ -483,7 +481,6 @@ QQuickV8ParticleData::QQuickV8ParticleData(QV8Engine* engine, QQuickParticleData { if (!engine || !datum) return; - v8::HandleScope handle_scope; QV8ParticleDataDeletable *d = particleV8Data(engine); m_v8Value = qPersistentNew(d->constructor->NewInstance()); diff --git a/src/qml/debugger/qv8debugservice.cpp b/src/qml/debugger/qv8debugservice.cpp index ec9a5197ca..ad4519b0a0 100644 --- a/src/qml/debugger/qv8debugservice.cpp +++ b/src/qml/debugger/qv8debugservice.cpp @@ -277,7 +277,6 @@ void QV8DebugService::sendDebugMessage(const QString &message) void QV8DebugService::processDebugMessages() { Q_D(QV8DebugService); - v8::HandleScope handleScope; // ### FIXME: v4 v8::Debug::ProcessDebugMessages(); } diff --git a/src/qml/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp index 7f5c4861bf..6055e81589 100644 --- a/src/qml/debugger/qv8profilerservice.cpp +++ b/src/qml/debugger/qv8profilerservice.cpp @@ -201,7 +201,6 @@ void QV8ProfilerService::startProfiling(const QString &title) if (d->m_ongoing.contains(title)) return; - v8::HandleScope handle_scope; v8::Handle<v8::String> v8title = v8::String::New(reinterpret_cast<const uint16_t*>(title.data()), title.size()); // ### FIXME: v4 // v8::CpuProfiler::StartProfiling(v8title); diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 61370fd97f..da34d06b8c 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -279,7 +279,6 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) bool isUndefined = false; - v8::HandleScope handle_scope; v8::Local<v8::Value> result = QQmlJavaScriptExpression::evaluate(context(), v8function, &isUndefined); @@ -321,7 +320,6 @@ QVariant QQmlBinding::evaluate() bool isUndefined = false; - v8::HandleScope handle_scope; v8::Local<v8::Value> result = QQmlJavaScriptExpression::evaluate(context(), v8function, &isUndefined); diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index d0b7109891..3e952c6458 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -140,7 +140,6 @@ QString QQmlBoundSignalExpression::expression() const { if (m_expressionFunctionValid) { Q_ASSERT (context() && engine()); - v8::HandleScope handle_scope; return m_v8function->v4Value().toQString(); } else if (!m_expressionUtf8.isEmpty()) { return QString::fromUtf8(m_expressionUtf8); @@ -162,7 +161,6 @@ void QQmlBoundSignalExpression::evaluate(void **a) ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation. { - v8::HandleScope handle_scope; if (!m_expressionFunctionValid) { //TODO: look at using the property cache here (as in the compiler) diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index f55dd5b4b6..cdca8049ed 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1360,7 +1360,6 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(v8::Handle<v8:: QV8Engine *v8engine = ep->v8engine(); QV4::ExecutionEngine *v4engine = QV8Engine::getV4(v8engine); - v8::HandleScope handle_scope; v8::Handle<v8::Value> ov = v8engine->newQObject(toCreate); Q_ASSERT(ov->IsObject()); v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(ov); @@ -1376,8 +1375,6 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(v8::Handle<v8:: QQmlComponentExtension::QQmlComponentExtension(QV8Engine *engine) { - v8::HandleScope handle_scope; - forceCompletion = qPersistentNew(V8FUNCTION(QV8IncubatorResource::ForceCompletion, engine)); { @@ -1484,7 +1481,6 @@ void QV8IncubatorResource::statusChanged(Status s) } if (!me.IsEmpty()) { // Will be false in synchronous mode - v8::HandleScope scope; v8::Local<v8::Value> callback = me->GetInternalField(0); if (!callback.IsEmpty() && !callback->IsUndefined()) { diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp index d0cf3e95ab..5a51cd10da 100644 --- a/src/qml/qml/qqmlexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -376,7 +376,6 @@ QVariant QQmlExpressionPrivate::value(bool *isUndefined) ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation. { - v8::HandleScope handle_scope; v8::Local<v8::Value> result = v8value(isUndefined); rv = ep->v8engine()->toVariant(result->v4Value(), -1); } diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 558a8c78dd..031a20b8a7 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -91,7 +91,6 @@ void QQmlDelayedError::setErrorDescription(const QString &description) void QQmlDelayedError::convertMessageToError(QQmlEngine *engine) const { if (!m_message.IsEmpty() && engine) { - v8::HandleScope handle_scope; QQmlExpressionPrivate::exceptionToError(m_message, m_error); qPersistentDispose(m_message); } @@ -336,8 +335,6 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scope, QQmlEngine *engine = ctxt->engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); - v8::HandleScope handle_scope; - v8::TryCatch tc; v8::Local<v8::Object> scopeobject = ep->v8engine()->qmlScope(ctxt, scope); v8::Local<v8::Script> script = ep->v8engine()->qmlModeCompile(code, codeLength, filename, line); @@ -377,8 +374,6 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scope, QQmlEngine *engine = ctxt->engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); - v8::HandleScope handle_scope; - v8::TryCatch tc; v8::Local<v8::Object> scopeobject = ep->v8engine()->qmlScope(ctxt, scope); v8::Local<v8::Script> script = ep->v8engine()->qmlModeCompile(code, filename, line); diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index 8e7bf25255..3cc811c8a6 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -726,8 +726,6 @@ public: QV8LocaleDataDeletable::QV8LocaleDataDeletable(QV8Engine *engine) { - v8::HandleScope handle_scope; - v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetHasExternalResource(true); diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index 29cc8c4298..4c24547a7f 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -339,9 +339,6 @@ QObject *QQmlVME::run(QList<QQmlError> *errors, QQmlEngine *engine = states.at(0).context->engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); - // Need a v8 handle scope and execution context for StoreVar instructions. - v8::HandleScope handleScope; - int status = -1; // needed for dbus QQmlPropertyPrivate::WriteFlags flags = QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::RemoveBindingOnAliasWrite; @@ -1242,8 +1239,6 @@ v8::Persistent<v8::Object> QQmlVME::run(QQmlContextData *parentCtxt, QQmlScriptD ctxt->importedScripts << run(ctxt, script->scripts.at(ii)->scriptData()); } - v8::HandleScope handle_scope; - v8::TryCatch try_catch; if (!script->isInitialized()) script->initialize(parentCtxt->engine); diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 64859e401f..db742830ce 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -705,7 +705,6 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) QQmlEnginePrivate *ep = (ctxt == 0 || ctxt->engine == 0) ? 0 : QQmlEnginePrivate::get(ctxt->engine); QV8Engine *v8e = (ep == 0) ? 0 : ep->v8engine(); if (v8e) { - v8::HandleScope handleScope; if (c == QMetaObject::ReadProperty) { *reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id); } else if (c == QMetaObject::WriteProperty) { @@ -931,7 +930,6 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) QQmlVMEMetaData::MethodData *data = metaData->methodData() + id; - v8::HandleScope handle_scope; v8::Handle<v8::Value> *args = 0; if (data->parameterCount) { @@ -1232,7 +1230,6 @@ bool QQmlVMEMetaObject::ensureVarPropertiesAllocated() // see also: QV8GCCallback::garbageCollectorPrologueCallback() void QQmlVMEMetaObject::allocateVarPropertiesArray() { - v8::HandleScope handleScope; varProperties = qPersistentNew(v8::Array::New(metaData->varPropertyCount)); varProperties.MakeWeak(static_cast<void*>(this), VarPropertiesWeakReferenceCallback); varPropertiesInitialized = true; diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 945eda809d..f23d066341 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1251,8 +1251,6 @@ void QQmlXMLHttpRequest::setMe(v8::Handle<v8::Object> me) void QQmlXMLHttpRequest::readyRead() { - v8::HandleScope handle_scope; - m_status = m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); m_statusText = @@ -1290,8 +1288,6 @@ static const char *errorToString(QNetworkReply::NetworkError error) void QQmlXMLHttpRequest::error(QNetworkReply::NetworkError error) { - v8::HandleScope handle_scope; - m_status = m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); m_statusText = @@ -1331,8 +1327,6 @@ void QQmlXMLHttpRequest::error(QNetworkReply::NetworkError error) #define XMLHTTPREQUEST_MAXIMUM_REDIRECT_RECURSION 15 void QQmlXMLHttpRequest::finished() { - v8::HandleScope handle_scope; - m_redirectCount++; if (m_redirectCount < XMLHTTPREQUEST_MAXIMUM_REDIRECT_RECURSION) { QVariant redirect = m_network->attribute(QNetworkRequest::RedirectionTargetAttribute); @@ -1464,8 +1458,6 @@ const QByteArray &QQmlXMLHttpRequest::rawResponseBody() const // Requires a TryCatch scope void QQmlXMLHttpRequest::dispatchCallback(v8::Handle<v8::Object> me) { - v8::HandleScope hs; - if (me.IsEmpty() || me->IsNull()) { v8::ThrowException(v8::Exception::Error(v8::String::New("Unable to dispatch QQmlXmlHttpRequest callback: invalid object"))); return; diff --git a/src/qml/qml/v4/qv4v8_p.h b/src/qml/qml/v4/qv4v8_p.h index bdcc72daf6..053e05f43d 100644 --- a/src/qml/qml/v4/qv4v8_p.h +++ b/src/qml/qml/v4/qv4v8_p.h @@ -586,34 +586,6 @@ public: }; - /** - * A stack-allocated class that governs a number of local handles. - * After a handle scope has been created, all local handles will be - * allocated within that handle scope until either the handle scope is - * deleted or another handle scope is created. If there is already a - * handle scope and a new one is created, all allocations will take - * place in the new handle scope until it is deleted. After that, - * new handles will again be allocated in the original handle scope. - * - * After the handle scope of a local handle has been deleted the - * garbage collector will no longer track the object stored in the - * handle and may deallocate it. The behavior of accessing a handle - * for which the handle scope has been deleted is undefined. - */ -class V8EXPORT HandleScope { - public: - HandleScope() {} - - ~HandleScope() {} - - /** - * Closes the handle scope and returns the value as a handle in the - * previous scope, which is the new current scope after the call. - */ - template <class T> Local<T> Close(Handle<T> value) { return Local<T>::New(value); } -}; - - // --- Special objects --- diff --git a/src/qml/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp index 658f6f3bcd..36bd688e44 100644 --- a/src/qml/qml/v8/qjsengine.cpp +++ b/src/qml/qml/v8/qjsengine.cpp @@ -319,7 +319,6 @@ QJSValue QJSEngine::newQObject(QObject *object) { // ### Q_D(QJSEngine); - v8::HandleScope handleScope; return d->scriptValueFromInternal(d->newQObject(object, QV8Engine::JavaScriptOwnership)); } @@ -345,7 +344,6 @@ QJSValue QJSEngine::globalObject() const QJSValue QJSEngine::create(int type, const void *ptr) { Q_D(QJSEngine); - v8::HandleScope handleScope; return new QJSValuePrivate(QV8Engine::getV4(d), d->metaTypeToJS(type, ptr)); } diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index f08a06fbc4..038006569e 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -110,8 +110,6 @@ static QString jsStack() { v8::Handle<v8::Value> console(ConsoleLogTypes logType, const v8::Arguments &args, bool printStack = false) { - v8::HandleScope handleScope; - QString result; QV8Engine *engine = V8ENGINE(); for (int i = 0; i < args.Length(); ++i) { diff --git a/src/qml/qml/v8/qv8bindings.cpp b/src/qml/qml/v8/qv8bindings.cpp index e9a0ef9cb9..43d1e8654f 100644 --- a/src/qml/qml/v8/qv8bindings.cpp +++ b/src/qml/qml/v8/qv8bindings.cpp @@ -170,7 +170,6 @@ void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags) DeleteWatcher watcher(this); ep->referenceScarceResources(); - v8::HandleScope handle_scope; v8::Local<v8::Value> result = evaluate(context, v8::Handle<v8::Function>::Cast(parent->functions()->Get(instruction->value)), @@ -242,8 +241,6 @@ QV8Bindings::QV8Bindings(QQmlCompiledData::V8Program *program, QV8Engine *engine = QQmlEnginePrivate::getV8Engine(context->engine); if (program->bindings.IsEmpty()) { - v8::HandleScope handle_scope; - v8::Local<v8::Script> script; bool compileFailed = false; { diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index b7abe17783..7d84b324be 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -149,7 +149,6 @@ QV8Engine::QV8Engine(QJSEngine* qq) ensurePerThreadIsolate(); - v8::HandleScope handle_scope; m_context = v8::Persistent<v8::Context>::New(v8::Context::GetCurrent()); qPersistentRegister(m_context); @@ -869,7 +868,6 @@ void QV8Engine::ensurePerThreadIsolate() void QV8Engine::initQmlGlobalObject() { - v8::HandleScope handels; initializeGlobal(QV4::Value::fromObject(m_v4Engine->globalObject)); freezeObject(QV4::Value::fromObject(m_v4Engine->globalObject)); } diff --git a/src/qml/qml/v8/qv8include.cpp b/src/qml/qml/v8/qv8include.cpp index 1c3895106b..0d76050298 100644 --- a/src/qml/qml/v8/qv8include.cpp +++ b/src/qml/qml/v8/qv8include.cpp @@ -125,8 +125,6 @@ void QV8Include::finished() } } - v8::HandleScope handle_scope; - if (m_reply->error() == QNetworkReply::NoError) { QByteArray data = m_reply->readAll(); diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index 424e90328c..f13e2d6eed 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -1309,8 +1309,6 @@ int QV8QObjectConnectionList::qt_metacall(QMetaObject::Call method, int index, v QVarLengthArray<int, 9> dummy; int *argsTypes = QQmlPropertyCache::methodParameterTypes(data(), index, dummy, 0); - v8::HandleScope handle_scope; - int argCount = argsTypes?argsTypes[0]:0; QVarLengthArray<v8::Handle<v8::Value>, 9> args(argCount); diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index af29b11aa4..113f99afc9 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1591,8 +1591,6 @@ void QQmlDelegateModelItemMetaType::initializeMetaObject() void QQmlDelegateModelItemMetaType::initializeConstructor() { - v8::HandleScope handleScope; - QQmlDelegateModelEngineData *data = engineData(v8Engine); constructor = qPersistentNew(v8::ObjectTemplate::New()); @@ -2101,7 +2099,6 @@ void QQmlDelegateModelGroupPrivate::emitChanges(QV8Engine *engine) { Q_Q(QQmlDelegateModelGroup); if (isChangedConnected() && !changeSet.isEmpty()) { - v8::HandleScope handleScope; v8::Local<v8::Object> removed = engineData(engine)->array(engine, changeSet.removes()); v8::Local<v8::Object> inserted = engineData(engine)->array(engine, changeSet.inserts()); emit q->changed(QQmlV4Handle::fromV8Handle(removed), QQmlV4Handle::fromV8Handle(inserted)); diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 8450b598d4..8b22047192 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1260,8 +1260,6 @@ void ModelNodeMetaObject::propertyWritten(int index) QString propName = QString::fromUtf8(name(index)); QVariant value = operator[](index); - v8::HandleScope handle_scope; - v8::Handle<v8::Value> v = eng->fromVariant(value); int roleIndex = m_obj->m_model->m_listModel->setExistingProperty(m_obj->m_elementIndex, propName, v, eng); diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 8a47baeb84..2fce25b0fc 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -223,8 +223,6 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init() "}); "\ "})" - v8::HandleScope handle_scope; - { v8::Local<v8::Script> onmessagescript = v8::Script::New(v8::String::New(CALL_ONMESSAGE_SCRIPT)); onmessage = qPersistentNew<v8::Function>(v8::Handle<v8::Function>::Cast(onmessagescript->Run())); @@ -342,8 +340,6 @@ void QQuickWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &d if (!script) return; - v8::HandleScope handle_scope; - v8::Handle<v8::Value> value = QV8Worker::deserialize(data, workerEngine); v8::TryCatch tc; @@ -369,8 +365,6 @@ void QQuickWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) QString sourceCode = QString::fromUtf8(data); QQmlScript::Parser::extractPragmas(sourceCode); - v8::HandleScope handle_scope; - WorkerScript *script = workers.value(id); if (!script) return; @@ -716,7 +710,6 @@ bool QQuickWorkerScript::event(QEvent *event) if (engine) { WorkerDataEvent *workerEvent = static_cast<WorkerDataEvent *>(event); QV8Engine *v8engine = QQmlEnginePrivate::get(engine)->v8engine(); - v8::HandleScope handle_scope; v8::Handle<v8::Value> value = QV8Worker::deserialize(workerEvent->data(), v8engine); emit message(QQmlV4Handle::fromV8Handle(value)); } diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 207b3f8a38..18e413776c 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -414,7 +414,6 @@ public: { if (type->constructor.IsEmpty()) { QQmlAdaptorModelEngineData * const data = engineData(engine); - v8::HandleScope handleScope; type->initializeConstructor(data); type->constructor->SetAccessor(data->hasModelChildren(), get_hasModelChildren); } diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index bb0879485c..f810c761dc 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -656,7 +656,6 @@ void QQuickCanvasItem::updatePolish() d->animationCallbacks.clear(); foreach (int key, animationCallbacks.keys()) { - v8::HandleScope handle_scope; v8::Handle<v8::Object> self = QQmlEnginePrivate::getV8Engine(qmlEngine(this))->newQObject(this); v8::Handle<v8::Value> args[] = { v8::Uint32::New(QDateTime::currentDateTimeUtc().toTime_t()) }; v8::Persistent<v8::Function> f = animationCallbacks.value(key); diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 473e915790..2bbb0935b0 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -3457,8 +3457,6 @@ QImage QQuickContext2D::toImage(const QRectF& bounds) QQuickContext2DEngineData::QQuickContext2DEngineData(QV8Engine *engine) { - v8::HandleScope handle_scope; - v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetHasExternalResource(true); ft->PrototypeTemplate()->SetAccessor(v8::String::New("canvas"), ctx2d_canvas, 0, v8::External::New(engine)); @@ -3660,8 +3658,6 @@ void QQuickContext2D::reset() void QQuickContext2D::setV8Engine(QV8Engine *engine) { - v8::HandleScope handle_scope; - if (m_v8engine != engine) { m_v8engine = engine; |