diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-11 12:26:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-11 16:01:24 +0200 |
commit | e964fc34269bc2087fb3246172a1890224a160bd (patch) | |
tree | b66e36e3fa6280bc94ad00002c035280ff24deee /src/qml/jsruntime/qv4mathobject.cpp | |
parent | f6de6160b915b5a35e75746a35c4ef94ceb9b2c2 (diff) |
Fix the remaining objects against self destruction
This makes pretty much all test cases pass with exact
garbage collection.
Change-Id: Ia874e3c17c3984afb7cfe370f9bd3ad8fe46699a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4mathobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4mathobject.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index fcff9e4aca..6280b7c392 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -55,6 +55,9 @@ MathObject::MathObject(ExecutionEngine *engine) { type = Type_MathObject; + Scope scope(engine); + ScopedObject protectThis(scope, this); + defineReadonlyProperty(QStringLiteral("E"), Primitive::fromDouble(::exp(1.0))); defineReadonlyProperty(QStringLiteral("LN2"), Primitive::fromDouble(::log(2.0))); defineReadonlyProperty(QStringLiteral("LN10"), Primitive::fromDouble(::log(10.0))); |