diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2015-06-05 15:20:23 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-06-08 08:22:11 +0000 |
commit | 78bffbca60b12cccad4d79770a6933b8b2e6b5f8 (patch) | |
tree | 4df73bc9865915a29a237fe145d0aca88c1e1c82 | |
parent | d6723686961bebe97eac002bdb3e276a75256121 (diff) |
V4: Fix use of uninitialized field.
Valgrind pointed out that Transition::id was used in a conditional jump
or move. Fixes regressions of the following tests on OSX:
ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1 in non-strict mode
ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2 in non-strict mode
ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28 in non-strict mode
Change-Id: Ia959ff6f9fdac8d4cb37f54f670fdff4c8ba9a67
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r-- | src/qml/jsruntime/qv4internalclass.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp index 49b284b979..a90e8e3689 100644 --- a/src/qml/jsruntime/qv4internalclass.cpp +++ b/src/qml/jsruntime/qv4internalclass.cpp @@ -199,10 +199,7 @@ InternalClass *InternalClass::nonExtensible() if (!extensible) return this; - Transition temp; - temp.lookup = 0; - temp.flags = Transition::NotExtensible; - + Transition temp = { Q_NULLPTR, Q_NULLPTR, Transition::NotExtensible}; Transition &t = lookupOrInsertTransition(temp); if (t.lookup) return t.lookup; |