8012593: JSAdapter overrides impacts strongly construction time
authorsundar
Fri, 19 Apr 2013 18:23:00 +0530
changeset 17232 069d8f31b069
parent 17231 734f61d5a097
child 17233 72ccf78a8216
8012593: JSAdapter overrides impacts strongly construction time Reviewed-by: jlaskey, attila
nashorn/src/jdk/nashorn/internal/objects/NativeJSAdapter.java
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeJSAdapter.java	Fri Apr 19 17:46:01 2013 +0530
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeJSAdapter.java	Fri Apr 19 18:23:00 2013 +0530
@@ -148,11 +148,7 @@
         if (overrides instanceof ScriptObject) {
             this.overrides = true;
             final ScriptObject sobj = (ScriptObject)overrides;
-            final Iterator<String> iter = sobj.propertyIterator();
-            while (iter.hasNext()) {
-                final String prop = iter.next();
-                super.set(prop, sobj.get(prop), false);
-            }
+            this.addBoundProperties(sobj);
         } else {
             this.overrides = false;
         }