diff --git a/nashorn/src/jdk/nashorn/internal/objects/Global.java b/nashorn/src/jdk/nashorn/internal/objects/Global.java index 5d28c1efd74..1c7e96b5a2c 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/Global.java +++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java @@ -1763,6 +1763,8 @@ public final class Global extends ScriptObject implements Scope { final int NOT_ENUMERABLE_NOT_CONFIG = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE; scontextProperty = addOwnProperty("context", NOT_ENUMERABLE_NOT_CONFIG, null); addOwnProperty("engine", NOT_ENUMERABLE_NOT_CONFIG, engine); + // default file name + addOwnProperty(ScriptEngine.FILENAME, Attribute.NOT_ENUMERABLE, null); // __noSuchProperty__ hook for ScriptContext search of missing variables final ScriptFunction noSuchProp = ScriptFunctionImpl.makeStrictFunction(NO_SUCH_PROPERTY_NAME, NO_SUCH_PROPERTY); addOwnProperty(NO_SUCH_PROPERTY_NAME, Attribute.NOT_ENUMERABLE, noSuchProp); diff --git a/nashorn/test/script/basic/JDK-8015969.js b/nashorn/test/script/basic/JDK-8015969.js index c8f8ca6817a..782d5929bf6 100644 --- a/nashorn/test/script/basic/JDK-8015969.js +++ b/nashorn/test/script/basic/JDK-8015969.js @@ -36,24 +36,6 @@ e.eval(<