changeset 201:c8460f668d0c

8012593: JSAdapter overrides impacts strongly construction time Reviewed-by: jlaskey, attila
author sundar
date Fri, 19 Apr 2013 18:23:00 +0530
parents bc251a7b5103
children 3a209cbd1d8f
files src/jdk/nashorn/internal/objects/NativeJSAdapter.java
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk/nashorn/internal/objects/NativeJSAdapter.java	Fri Apr 19 17:46:01 2013 +0530
+++ b/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;
         }