Fix qqmlecmascript::propertyVarOwnership
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Jun 2013 14:49:34 +0000 (16:49 +0200)
committerLars Knoll <lars.knoll@digia.com>
Thu, 13 Jun 2013 15:50:39 +0000 (17:50 +0200)
commit80aa1e04517882ee42747a2a5f6a727e1128d691
treee7ddb991562caf290542981d07fda629d3cbb369
parente93d3a57f07f7f2cdb8f2fb42c30d731e0097c91
Fix qqmlecmascript::propertyVarOwnership

Don't rely on o = new Date in the test-case to really clear the last "reference"
on the stack. As it turns out, in v4, we sometimes allocate the result of "new Date"
in a different slot and the old slot is still around (and thus the object is
visible and marked).

Instead work with separate scopes, which requires a little helper function in JS.

Change-Id: I5f318feaccfc7d83dbe28be043a0ee83e0c16355
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.5.qml