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

Unified Diff: plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java

Issue 11602013: Redesign scope API, separate declarative and object scopes. (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: patching other backends Created 7 years, 11 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: plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java
diff --git a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java
index dc13ddda4e19eeed1b3c45acd5e4f12a8aa5655d..d7998d70e48671283dde1ba25c248716a089b2f9 100755
--- a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java
+++ b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Variable.java
@@ -9,14 +9,12 @@ import java.util.List;
import org.chromium.debug.core.ChromiumDebugPlugin;
import org.chromium.sdk.CallbackSemaphore;
-import org.chromium.sdk.ExceptionData;
import org.chromium.sdk.FunctionScopeExtension;
import org.chromium.sdk.JsEvaluateContext;
import org.chromium.sdk.JsEvaluateContext.ResultOrException;
import org.chromium.sdk.JsFunction;
import org.chromium.sdk.JsObjectProperty;
import org.chromium.sdk.JsScope;
-import org.chromium.sdk.JsScope.WithScope;
import org.chromium.sdk.JsValue;
import org.chromium.sdk.JsVariable;
import org.chromium.sdk.RelayOk;
@@ -106,17 +104,11 @@ public abstract class Variable extends DebugElementImpl.WithEvaluate implements
value, null);
}
- public static Variable forScope(EvaluateContext evaluateContext, JsScope scope,
- ExpressionTracker.Node expressionNode) {
+ public static Variable forObjectScope(EvaluateContext evaluateContext,
+ JsScope.ObjectBased scope, ExpressionTracker.Node expressionNode) {
String scopeVariableName = "<" + scope.getType() + ">";
- ValueBase scopeValue = new ValueBase.ScopeValue(evaluateContext, scope, expressionNode);
- return forScopeImpl(evaluateContext, scopeVariableName, scopeValue);
- }
-
- public static Variable forWithScope(EvaluateContext evaluateContext,
- WithScope withScope, ExpressionTracker.Node expressionNode) {
- Value value = Value.create(evaluateContext, withScope.getWithArgument(), expressionNode);
- return forScopeImpl(evaluateContext, "<with>", value);
+ Value value = Value.create(evaluateContext, scope.getScopeObject(), expressionNode);
+ return forScopeImpl(evaluateContext, scopeVariableName, value);
}
private static Variable forScopeImpl(EvaluateContext evaluateContext, String scopeName,

Powered by Google App Engine
This is Rietveld 408576698