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

Side by Side Diff: plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/CallFrameImpl.java

Issue 11662019: Support variable changing in SDK interface and v8 native (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: merge 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.sdk.internal.v8native; 5 package org.chromium.sdk.internal.v8native;
6 6
7 import java.util.ArrayList; 7 import java.util.ArrayList;
8 import java.util.Collections; 8 import java.util.Collections;
9 import java.util.List; 9 import java.util.List;
10 import java.util.concurrent.atomic.AtomicReference; 10 import java.util.concurrent.atomic.AtomicReference;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 PropertyReference ref = V8Helper.computeReceiverRef(frameObject); 161 PropertyReference ref = V8Helper.computeReceiverRef(frameObject);
162 if (ref == null) { 162 if (ref == null) {
163 result = null; 163 result = null;
164 } else { 164 } else {
165 ValueLoader valueLoader = context.getValueLoader(); 165 ValueLoader valueLoader = context.getValueLoader();
166 ValueMirror mirror = 166 ValueMirror mirror =
167 valueLoader.getOrLoadValueFromRefs(Collections.singletonList(ref)).get (0); 167 valueLoader.getOrLoadValueFromRefs(Collections.singletonList(ref)).get (0);
168 // This name should be string. We are making it string as a fall-back stra tegy. 168 // This name should be string. We are making it string as a fall-back stra tegy.
169 String varNameStr = ref.getName().toString(); 169 String varNameStr = ref.getName().toString();
170 result = new JsVariableBase.Impl(valueLoader, mirror, varNameStr); 170 // 'this' variable is not mutable. Consider making it mutable.
171 result = new JsVariableBase.Impl(null, valueLoader, mirror, varNameStr);
171 } 172 }
172 if (result != null) { 173 if (result != null) {
173 receiverVariableRef.compareAndSet(null, result); 174 receiverVariableRef.compareAndSet(null, result);
174 } 175 }
175 } 176 }
176 177
177 @Override 178 @Override
178 public TextStreamPosition getStatementStartPosition() { 179 public TextStreamPosition getStatementStartPosition() {
179 return textStreamPosition; 180 return textStreamPosition;
180 } 181 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 370 }
370 371
371 @Override 372 @Override
372 public boolean canRestartFrame(CallFrame callFrame) { 373 public boolean canRestartFrame(CallFrame callFrame) {
373 return callFrame.getScript() != null; 374 return callFrame.getScript() != null;
374 } 375 }
375 }; 376 };
376 377
377 private static final String DEBUGGER_RESERVED = "debugger"; 378 private static final String DEBUGGER_RESERVED = "debugger";
378 } 379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698