--- old/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/WithObject.java 2015-06-15 14:38:29.829421871 +0200 +++ new/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/WithObject.java 2015-06-15 14:38:29.745421872 +0200 @@ -236,10 +236,10 @@ * Get first parent scope that is not an instance of WithObject. */ private Scope getNonWithParent() { - ScriptObject proto = getParentScope(); + ScriptObject proto = getProto(); while (proto != null && proto instanceof WithObject) { - proto = ((WithObject)proto).getParentScope(); + proto = proto.getProto(); } assert proto instanceof Scope : "with scope without parent scope"; @@ -380,14 +380,6 @@ 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)); }