# HG changeset patch # User attila # Date 1400679491 -7200 # Node ID 20971b9687ecbeda67886fc476696ee1f272842c # Parent 96a251e5723230715d95e758b7896b3dc23d202b 8043605: Enable history for empty property maps Reviewed-by: jlaskey, sundar diff -r 96a251e57232 -r 20971b9687ec nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Wed May 21 12:52:58 2014 +0200 +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Wed May 21 15:38:11 2014 +0200 @@ -651,13 +651,11 @@ * @param newMap Modified {@link PropertyMap}. */ private void addToHistory(final Property property, final PropertyMap newMap) { - if (!properties.isEmpty()) { - if (history == null) { - history = new WeakHashMap<>(); - } + if (history == null) { + history = new WeakHashMap<>(); + } - history.put(property, new SoftReference<>(newMap)); - } + history.put(property, new SoftReference<>(newMap)); } /**