8012593: JSAdapter overrides impacts strongly construction time
Reviewed-by: jlaskey, attila
--- 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;
}