diff options
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 6aeabf9221..aff0cf2b59 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -259,6 +259,10 @@ public: : Object(engine) { vtbl = &static_vtbl; + + Scope scope(engine); + ScopedObject protectThis(scope, this); + defineAccessorProperty(QStringLiteral("nodeName"), method_get_nodeName, 0); defineAccessorProperty(QStringLiteral("nodeValue"), method_get_nodeValue, 0); defineAccessorProperty(QStringLiteral("nodeType"), method_get_nodeType, 0); @@ -1568,7 +1572,7 @@ void QQmlXMLHttpRequest::dispatchCallback(const ValueRef me) // the source is changed). We do nothing in this case, as the evaluation // cannot succeed. } catch (...) { - QQmlError error = QQmlError::catchJavaScriptException(ctx); + QQmlError error = QV4::ExecutionEngine::convertJavaScriptException(ctx); QQmlEnginePrivate::warning(QQmlEnginePrivate::get(v4->v8Engine->engine()), error); } } |