diff options
Diffstat (limited to 'src/jdk/nashorn/internal/runtime/DebuggerSupport.java')
-rw-r--r-- | src/jdk/nashorn/internal/runtime/DebuggerSupport.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jdk/nashorn/internal/runtime/DebuggerSupport.java b/src/jdk/nashorn/internal/runtime/DebuggerSupport.java index 38e5d858..d5dc560f 100644 --- a/src/jdk/nashorn/internal/runtime/DebuggerSupport.java +++ b/src/jdk/nashorn/internal/runtime/DebuggerSupport.java @@ -26,6 +26,7 @@ package jdk.nashorn.internal.runtime; import static jdk.nashorn.internal.codegen.CompilerConstants.SOURCE; +import static jdk.nashorn.internal.runtime.UnwarrantedOptimismException.INVALID_PROGRAM_POINT; import java.lang.invoke.MethodHandle; import java.lang.reflect.Field; @@ -53,6 +54,7 @@ final class DebuggerSupport { * available to external debuggers. */ @SuppressWarnings("unused") + final DebuggerValueDesc forceLoad = new DebuggerValueDesc(null, false, null, null); // Hook to force the loading of the SourceInfo class @@ -155,7 +157,7 @@ final class DebuggerSupport { try { return context.eval(initialScope, string, callThis, ScriptRuntime.UNDEFINED, false); - } catch (Throwable ex) { + } catch (final Throwable ex) { return returnException ? ex : null; } } @@ -237,12 +239,12 @@ final class DebuggerSupport { if (ScriptObject.isArray(object)) { sb.append('['); - final long length = object.getLong("length"); + final long length = object.getLong("length", INVALID_PROGRAM_POINT); for (long i = 0; i < length; i++) { if (object.has(i)) { final Object valueAsObject = object.get(i); - final boolean isUndefined = JSType.of(valueAsObject) == JSType.UNDEFINED; + final boolean isUndefined = valueAsObject == ScriptRuntime.UNDEFINED; if (isUndefined) { if (i != 0) { |