aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4argumentsobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-07 11:45:11 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:18:21 +0000
commit475f4559d97dca4e85e6601f77593b354193393d (patch)
treee2186a0e8c44221fc5ec9aca51b35b9cf28ece97 /src/qml/jsruntime/qv4argumentsobject.cpp
parent5109cbed6dcd56dc283235a3a72de23358b955f7 (diff)
Don't throw from within defineOwnProperty
There's no need to to this there, rather throw from the places we call those methods. This also removes some more places where we access the strictMode flag of the context. Change-Id: I4bebc9d3c242850f06230d9116479a85a944dca3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4argumentsobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 6066f612d9..0d2d5fb072 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -129,8 +129,11 @@ bool ArgumentsObject::defineOwnProperty(ExecutionEngine *engine, uint index, con
}
bool result = Object::defineOwnProperty2(scope.engine, index, desc, attrs);
- if (!result)
+ if (!result) {
+ if (d()->isStrict)
+ return engine->throwTypeError();
return false;
+ }
if (isMapped && attrs.isData()) {
Q_ASSERT(arrayData());