diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-23 13:35:17 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-23 21:36:08 +0200 |
commit | 6a9badef274b55ae0ed06ca96cbe035b445fcf5b (patch) | |
tree | f4a47ffa777c852e5139e034d7a591c33d41db0f /tests | |
parent | 2d747f3be31daed1a56375fb50e5c019570a1006 (diff) |
Fix a memory management issues with the name map in internal classes
The string pointer we store in the nameMap is not marked directly, i.e. our
class hierarchy doesn't have a recursive mark() function. So we must otherwise
make sure that that string is marked, otherwise we get dangling pointers that
are likely to point to _other_ strings later. This is hard to reproduce, but it
does happen with MM_AGGRESSIVE_GC=1 and the singletonType test in
qqmlecmascript, when due to the dangling pointer we end up using the wrong
property name in freeze() when iterating through the name map.
This patch fixes that by storing the actual identifier string, that's
guaranteed to get marked.
Change-Id: I28d1a2d2f56fe3abf692229ba008af8b0789189e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions