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

Unified Diff: plugins/org.chromium.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java

Issue 12300043: Move setValue operation into a separate JsDeclarativeVariable interface (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: fcr Created 7 years, 10 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.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java
diff --git a/plugins/org.chromium.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java b/plugins/org.chromium.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java
index 5a25c4c6e68066902606e8e963b4e2e6849d14dc..d17b5fb03828d8e202cc96c1a8002cbaeb2472a4 100644
--- a/plugins/org.chromium.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java
+++ b/plugins/org.chromium.sdk.wipbackend.dev/src/org/chromium/sdk/internal/wip/WipContextBuilder.java
@@ -24,6 +24,7 @@ import org.chromium.sdk.DebugContext;
import org.chromium.sdk.DebugContext.StepAction;
import org.chromium.sdk.ExceptionData;
import org.chromium.sdk.JavascriptVm;
+import org.chromium.sdk.JsDeclarativeVariable;
import org.chromium.sdk.JsEvaluateContext;
import org.chromium.sdk.JsObject;
import org.chromium.sdk.JsScope;
@@ -412,7 +413,7 @@ class WipContextBuilder {
}
private JsVariable createSimpleNameVariable(String name, RemoteObjectValue thisObjectData) {
- return valueLoader.getValueBuilder().createVariable(thisObjectData, name, null);
+ return valueLoader.getValueBuilder().createVariable(thisObjectData, name);
}
private final WipEvaluateContextBase<?> evaluateContext =
@@ -612,7 +613,7 @@ class WipContextBuilder {
}
@Override
- public List<? extends JsVariable> getVariables() throws MethodIsBlockingException {
+ public List<? extends JsDeclarativeVariable> getVariables() throws MethodIsBlockingException {
int currentCacheState = valueLoader.getCacheState();
if (propertiesRef.isInitialized()) {
ScopeVariables result = propertiesRef.getSync().get();
@@ -642,13 +643,15 @@ class WipContextBuilder {
public Getter<ScopeVariables> process(List<? extends PropertyDescriptorValue> propertyList,
List<? extends InternalPropertyDescriptorValue> internalPropertyList,
int currentCacheState) {
- final List<JsVariable> properties = new ArrayList<JsVariable>(propertyList.size());
+ final List<JsDeclarativeVariable> properties =
+ new ArrayList<JsDeclarativeVariable>(propertyList.size());
WipValueBuilder valueBuilder = valueLoader.getValueBuilder();
for (PropertyDescriptorValue property : propertyList) {
final String name = property.name();
- JsVariable variable = valueBuilder.createVariable(property.value(), name, scopeParams);
+ JsDeclarativeVariable variable =
+ valueBuilder.createDeclarativeVariable(property.value(), name, scopeParams);
properties.add(variable);
}
final ScopeVariables scopeVariables = new ScopeVariables(properties, currentCacheState);
@@ -776,10 +779,10 @@ class WipContextBuilder {
}
private static class ScopeVariables {
- final List<JsVariable> variables;
+ final List<JsDeclarativeVariable> variables;
final int cacheState;
- ScopeVariables(List<JsVariable> variables, int cacheState) {
+ ScopeVariables(List<JsDeclarativeVariable> variables, int cacheState) {
this.variables = variables;
this.cacheState = cacheState;
}
@@ -788,7 +791,7 @@ class WipContextBuilder {
private static final Getter<ScopeVariables> EMPTY_SCOPE_VARIABLES_OPTIONAL =
new Getter<ScopeVariables>() {
private final ScopeVariables value =
- new ScopeVariables(Collections.<JsVariable>emptyList(), Integer.MAX_VALUE);
+ new ScopeVariables(Collections.<JsDeclarativeVariable>emptyList(), Integer.MAX_VALUE);
@Override ScopeVariables get() {
return value;

Powered by Google App Engine
This is Rietveld 408576698