src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/WithObject.java

Print this page

        

*** 234,247 **** /** * Get first parent scope that is not an instance of WithObject. */ private Scope getNonWithParent() { ! ScriptObject proto = getParentScope(); while (proto != null && proto instanceof WithObject) { ! proto = ((WithObject)proto).getParentScope(); } assert proto instanceof Scope : "with scope without parent scope"; return (Scope) proto; } --- 234,247 ---- /** * Get first parent scope that is not an instance of WithObject. */ private Scope getNonWithParent() { ! ScriptObject proto = getProto(); while (proto != null && proto instanceof WithObject) { ! proto = proto.getProto(); } assert proto instanceof Scope : "with scope without parent scope"; return (Scope) proto; }
*** 378,394 **** */ public ScriptObject getExpression() { return expression; } - /** - * Get the parent scope for this {@code WithObject} - * @return the parent scope - */ - public ScriptObject getParentScope() { - return getProto(); - } - private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) { return MH.findStatic(MethodHandles.lookup(), WithObject.class, name, MH.type(rtype, types)); } } --- 378,386 ----