From 74c8fe86755af485f8d0a47799d6d50f00070f05 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 1 Sep 2017 11:48:15 +0200 Subject: Always set the correct FunctionObject when calling JS functions Renamed ScopedCallData to JSCall, enforced passing a JS FunctionObject to it, and added call() and callAsConstructor() methods to it. Change-Id: I30db65c9765c2896b5909fe2105c0934c6dad861 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlxmlhttprequest.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp') diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index a77c4c5678..21f1fb30b0 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1576,9 +1576,7 @@ void QQmlXMLHttpRequest::dispatchCallback(Object *thisObj, QQmlContextData *cont return; } - QV4::ScopedCallData callData(scope); - callData->thisObject = Encode::undefined(); - callback->call(callData); + QV4::JSCall(scope, callback).call(); if (scope.engine->hasException) { QQmlError error = scope.engine->catchExceptionAsQmlError(); -- cgit v1.2.3