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

changeset 1529
098356b162c9
parent 1527
340b1462f3e2
child 1531
ab48ce00c634
equal deleted inserted replaced
1528:e7e277e29b1a 1529:098356b162c9
201 this.prototype = LAZY_PROTOTYPE; 201 this.prototype = LAZY_PROTOTYPE;
202 202
203 // We have to fill user accessor functions late as these are stored 203 // We have to fill user accessor functions late as these are stored
204 // in this object rather than in the PropertyMap of this object. 204 // in this object rather than in the PropertyMap of this object.
205 assert objectSpill == null; 205 assert objectSpill == null;
206 final ScriptFunction typeErrorThrower = global.getTypeErrorThrower(); 206 if (isStrict() || isBoundFunction()) {
207 if (findProperty("arguments", true) != null) { 207 final ScriptFunction typeErrorThrower = global.getTypeErrorThrower();
208 initUserAccessors("arguments", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower); 208 initUserAccessors("arguments", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower);
209 }
210
211 if (findProperty("caller", true) != null) {
212 initUserAccessors("caller", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower); 209 initUserAccessors("caller", Property.NOT_CONFIGURABLE | Property.NOT_ENUMERABLE, typeErrorThrower, typeErrorThrower);
213 } 210 }
214 } 211 }
215 212
216 /** 213 /**

mercurial