src/jdk/nashorn/internal/objects/NativeArguments.java
Print this page
rev 755 : 8035948: Redesign property listeners for shared classes
Reviewed-by: sundar, lagergren
@@ -66,11 +66,11 @@
static {
final ArrayList<Property> properties = new ArrayList<>(2);
properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH));
properties.add(AccessorProperty.create("callee", Property.NOT_ENUMERABLE, G$CALLEE, S$CALLEE));
- map$ = PropertyMap.newMap(properties).setIsShared();
+ map$ = PropertyMap.newMap(properties);
}
static PropertyMap getInitialMap() {
return map$;
}
@@ -265,13 +265,13 @@
// Strict functions won't always have a callee for arguments, and will pass null instead.
final boolean isStrict = callee == null || callee.isStrict();
final Global global = Global.instance();
final ScriptObject proto = global.getObjectPrototype();
if (isStrict) {
- return new NativeStrictArguments(arguments, numParams, proto, global.getStrictArgumentsMap());
+ return new NativeStrictArguments(arguments, numParams, proto, NativeStrictArguments.getInitialMap());
}
- return new NativeArguments(arguments, callee, numParams, proto, global.getArgumentsMap());
+ return new NativeArguments(arguments, callee, numParams, proto, NativeArguments.getInitialMap());
}
/**
* Length getter
* @param self self reference