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

Print this page

        

*** 472,482 **** * @param expression expression in with * * @return {@link WithObject} that is the new scope */ public static ScriptObject openWith(final ScriptObject scope, final Object expression) { ! final ScriptObject global = Context.getGlobalTrusted(); if (expression == UNDEFINED) { throw typeError(global, "cant.apply.with.to.undefined"); } else if (expression == null) { throw typeError(global, "cant.apply.with.to.null"); } --- 472,482 ---- * @param expression expression in with * * @return {@link WithObject} that is the new scope */ public static ScriptObject openWith(final ScriptObject scope, final Object expression) { ! final Global global = Context.getGlobal(); if (expression == UNDEFINED) { throw typeError(global, "cant.apply.with.to.undefined"); } else if (expression == null) { throw typeError(global, "cant.apply.with.to.null"); }