diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-27 12:01:33 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-28 13:20:04 +0000 |
commit | f8864acdcb21f32f7872d4a3cde0a1922fea3147 (patch) | |
tree | b26e005bf4c71c195e7c215ff8c375b450091a26 /src/qml/jsruntime/qv4value.cpp | |
parent | a516996f317956578b684d37b430460522e74398 (diff) |
Avoid more stores of the accumulator on the stack
Change-Id: Ieace8a47428e60e38ee6827a05ebe00db935c5cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4value.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4value.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp index 79035bf154..2b010f7474 100644 --- a/src/qml/jsruntime/qv4value.cpp +++ b/src/qml/jsruntime/qv4value.cpp @@ -113,6 +113,7 @@ double Value::toNumberImpl() const { Q_ASSERT(isObject()); Scope scope(objectValue()->engine()); + ScopedValue protectThis(scope, *this); ScopedValue prim(scope, RuntimeHelpers::toPrimitive(*this, NUMBER_HINT)); if (scope.engine->hasException) return 0; |