changeset 172:069923cc9de5

Merge
author jlaskey
date Thu, 04 Apr 2013 09:06:29 -0300
parents f638f2f094f7 (diff) 0548c134b9ac (current diff)
children 18df6640e63f
files
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk/nashorn/internal/runtime/PropertyMap.java	Thu Apr 04 13:54:51 2013 +0530
+++ b/src/jdk/nashorn/internal/runtime/PropertyMap.java	Thu Apr 04 09:06:29 2013 -0300
@@ -540,11 +540,13 @@
      * @param newMap   Modified {@link PropertyMap}.
      */
     private void addToHistory(final Property property, final PropertyMap newMap) {
-        if (history == null) {
-            history = new LinkedHashMap<>();
+        if (!properties.isEmpty()) {
+            if (history == null) {
+                history = new LinkedHashMap<>();
+            }
+
+            history.put(property, newMap);
         }
-
-        history.put(property, newMap);
     }
 
     /**