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

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.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/DartiumDebugIndexedValue.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java (revision 37109)
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java (working copy)
@@ -24,6 +24,8 @@
import org.eclipse.debug.core.model.IVariable;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -46,7 +48,7 @@
@Override
public int getSize() throws DebugException {
- return value.getListLength();
+ return value.getListLength(getTarget().getConnection());
}
@Override
@@ -78,10 +80,33 @@
}
@Override
+ public boolean hasVariables() throws DebugException {
+ return true;
+ }
+
+ @Override
public boolean isListValue() {
return true;
}
+ @Override
+ protected void populate() {
+ try {
+ int length = value.getListLength(getTarget().getConnection());
+
+ IVariable[] variables = getVariables(0, length);
+ List<IVariable> variablesList = new ArrayList<IVariable>();
+
+ for (int i = 0; i < length; i++) {
+ variablesList.add(variables[i]);
+ }
+
+ variableCollector = VariableCollector.fixed(getTarget(), variablesList);
+ } catch (DebugException e) {
+ variableCollector = VariableCollector.empty();
+ }
+ }
+
private WebkitRemoteObject getIndexAt(WebkitRemoteObject listObject, int offset)
throws IOException {
final WebkitRemoteObject[] results = new WebkitRemoteObject[1];
@@ -90,7 +115,7 @@
getConnection().getRuntime().callFunctionOn(
listObject.getObjectId(),
- "()=>this[" + offset + "]",
+ "() => this[" + offset + "]",
null,
false,
new WebkitCallback<WebkitRemoteObject>() {

Powered by Google App Engine
This is Rietveld 408576698