Mercurial > hg > truffle
changeset 22290:ca426f243321
fix potential assertion error after previous change
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Thu, 08 Oct 2015 14:21:19 +0200 |
parents | cf203af4610c |
children | c3ea80aa5762 |
files | truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java Wed Oct 07 20:05:15 2015 +0200 +++ b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java Thu Oct 08 14:21:19 2015 +0200 @@ -291,7 +291,9 @@ public void define(Object id, Object value, int flags, LocationFactory locationFactory) { ShapeImpl oldShape = getShape(); ShapeImpl newShape = oldShape.defineProperty(id, value, flags, locationFactory); - updateShape(); + if (updateShape()) { + oldShape = getShape(); + } Property property = newShape.getProperty(id); if (oldShape == newShape) {