From 4c5ed04e64ea9ac0038ae30e1189cfe745b29bd9 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 23 Jan 2020 14:19:48 +0100 Subject: V4: Check for exceptions before we use the result of a JS call If the call resulted in an exception the return value is undefined. Task-number: QTBUG-81581 Change-Id: Ibfdd5e1229cf5437f270232d3b1a91308adeec72 Reviewed-by: Fabian Kosmale --- src/qml/jsruntime/qv4object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4object.cpp') diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 89161433ed..b723141caa 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -105,7 +105,7 @@ ReturnedValue Object::getValueAccessor(const Value *thisObject, const Value &v, JSCallData jsCallData(scope); if (thisObject) *jsCallData->thisObject = *thisObject; - return f->call(jsCallData); + return checkedResult(scope.engine, f->call(jsCallData)); } bool Object::putValue(uint memberIndex, PropertyAttributes attrs, const Value &value) -- cgit v1.2.3