Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugValue.java

Issue 328663002: Version 1.5.0-dev.4.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugValue.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugValue.java (revision 37109)
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugValue.java (working copy)
@@ -57,7 +57,7 @@
private DartiumDebugVariable variable;
protected WebkitRemoteObject value;
- private VariableCollector variableCollector;
+ protected VariableCollector variableCollector;
protected DartiumDebugValue(DartiumDebugTarget target, DartiumDebugVariable variable,
WebkitRemoteObject value) {
@@ -197,9 +197,9 @@
if (isListValue()) {
if (value.getClassName() != null) {
- return value.getClassName() + "[" + value.getListLength() + "]";
+ return value.getClassName() + "[" + value.getListLength(getConnection()) + "]";
} else {
- return "List[" + value.getListLength() + "]";
+ return "List[" + value.getListLength(getConnection()) + "]";
}
}
@@ -267,11 +267,7 @@
@Override
public boolean hasVariables() throws DebugException {
try {
- if (isListValue()) {
- return value.getListLength() > 0;
- } else {
- return value.hasObjectId();
- }
+ return value.hasObjectId() && !value.isNull() && !value.isPrimitive();
} catch (Throwable t) {
throw createDebugException(t);
}
@@ -304,6 +300,17 @@
fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT));
}
+ protected void populate() {
+ if (value.hasObjectId()) {
+ variableCollector = VariableCollector.createCollector(
+ getTarget(),
+ variable,
+ Collections.singletonList(value));
+ } else {
+ variableCollector = VariableCollector.empty();
+ }
+ }
+
private void evalOnGlobalContext(final String expression,
final WebkitResult<WebkitRemoteObject> originalResult, final IWatchExpressionListener listener) {
try {
@@ -353,15 +360,4 @@
}
}
- private void populate() {
- if (value.hasObjectId()) {
- variableCollector = VariableCollector.createCollector(
- getTarget(),
- variable,
- Collections.singletonList(value));
- } else {
- variableCollector = VariableCollector.empty();
- }
- }
-
}

Powered by Google App Engine
This is Rietveld 408576698