src/jdk/nashorn/internal/runtime/ScriptFunction.java

changeset 1529
098356b162c9
parent 1527
340b1462f3e2
child 1531
ab48ce00c634
     1.1 --- a/src/jdk/nashorn/internal/runtime/ScriptFunction.java	Thu Sep 10 15:28:05 2015 +0200
     1.2 +++ b/src/jdk/nashorn/internal/runtime/ScriptFunction.java	Thu Sep 10 19:09:23 2015 +0530
     1.3 @@ -203,12 +203,9 @@
     1.4          // We have to fill user accessor functions late as these are stored
     1.5          // in this object rather than in the PropertyMap of this object.
     1.6          assert objectSpill == null;
     1.7 -        final ScriptFunction typeErrorThrower = global.getTypeErrorThrower();
     1.8 -        if (findProperty("arguments", true) != null) {
     1.9 +        if (isStrict() || isBoundFunction()) {
    1.10 +            final ScriptFunction typeErrorThrower = global.getTypeErrorThrower();
    1.11              initUserAccessors("arguments", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower);
    1.12 -        }
    1.13 -
    1.14 -        if (findProperty("caller", true) != null) {
    1.15              initUserAccessors("caller", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower);
    1.16          }
    1.17      }

mercurial