diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-07 11:43:23 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 08:18:17 +0000 |
commit | 5109cbed6dcd56dc283235a3a72de23358b955f7 (patch) | |
tree | 75f413e9c4ee197b0ffb1dfb3bbac6309c0b3ad8 /src/qml/jsruntime/qv4arrayobject.cpp | |
parent | de8a6fd034e740e09c7385523026bc17d769edd3 (diff) |
Fix strict mode usage in Array.splice
There's no need to take the strict mode flag away before calling
put. At least the spec clearly says to just call put() the regular
way.
Change-Id: I9d664ea3efbd382e332c189cb069b42fd8b59c8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4arrayobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arrayobject.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index 7e32c948ac..383c395b1b 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -593,11 +593,8 @@ ReturnedValue ArrayPrototype::method_splice(const BuiltinFunction *b, CallData * CHECK_EXCEPTION(); } - bool wasStrict = scope.engine->current->strictMode; - scope.engine->current->strictMode = true; instance->put(scope.engine->id_length(), ScopedValue(scope, Primitive::fromDouble(len - deleteCount + itemCount))); - scope.engine->current->strictMode = wasStrict; return newArray->asReturnedValue(); } |