aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-04-20 10:28:31 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-04-21 20:10:59 +0200
commitf31a2dc6fc713ee06ea7a9ba45c3ceaace7d735d (patch)
tree6682724ad9ac2aa07310e89b5144ddcf9e4716ad /src/qml/jsruntime/qv4stringobject.cpp
parent239a90b8d5588bc6536cb81bbba7af8cc049d945 (diff)
Check in even more places for exceptions
Amends commit 4c5ed04e64ea9ac0038ae30e1189cfe745b29bd9 Task-number: QTBUG-83384 Pick-to: 5.15 5.12 Change-Id: I0918c27dfa73dff83cbf0f58b41ce8620dff8a0a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 209a1b4e76..bf098fef26 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -571,7 +571,7 @@ ReturnedValue StringPrototype::method_match(const FunctionObject *b, const Value
ScopedFunctionObject fo(scope, f);
if (!fo)
return scope.engine->throwTypeError();
- return fo->call(r, thisObject, 1);
+ return checkedResult(scope.engine, fo->call(r, thisObject, 1));
}
}
@@ -862,6 +862,7 @@ ReturnedValue StringPrototype::method_replace(const FunctionObject *b, const Val
Value that = Value::undefinedValue();
replacement = searchCallback->call(&that, arguments, numCaptures + 2);
+ CHECK_EXCEPTION();
result += string.midRef(lastEnd, matchStart - lastEnd);
result += replacement->toQString();
lastEnd = matchEnd;