src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java
equal
deleted
inserted
replaced
1227 * Get the proto of a specific depth |
1227 * Get the proto of a specific depth |
1228 * @param n depth |
1228 * @param n depth |
1229 * @return proto at given depth |
1229 * @return proto at given depth |
1230 */ |
1230 */ |
1231 public final ScriptObject getProto(final int n) { |
1231 public final ScriptObject getProto(final int n) { |
1232 assert n > 0; |
1232 ScriptObject p = this; |
1233 ScriptObject p = getProto(); |
1233 for (int i = n; i > 0; i--) { |
1234 for (int i = n; --i > 0;) { |
|
1235 p = p.getProto(); |
1234 p = p.getProto(); |
1236 } |
1235 } |
1237 return p; |
1236 return p; |
1238 } |
1237 } |
1239 |
1238 |