| OLD | NEW |
| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // 'this' variable is not mutable. Consider making it mutable. | 170 // 'this' variable is not mutable. Consider making it mutable. |
| 171 result = new JsVariableBase.Impl(null, valueLoader, mirror, varNameStr); | 171 result = new JsVariableBase.Impl(valueLoader, mirror, varNameStr); |
| 172 } | 172 } |
| 173 if (result != null) { | 173 if (result != null) { |
| 174 receiverVariableRef.compareAndSet(null, result); | 174 receiverVariableRef.compareAndSet(null, result); |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 @Override | 178 @Override |
| 179 public TextStreamPosition getStatementStartPosition() { | 179 public TextStreamPosition getStatementStartPosition() { |
| 180 return textStreamPosition; | 180 return textStreamPosition; |
| 181 } | 181 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 @Override | 372 @Override |
| 373 public boolean canRestartFrame(CallFrame callFrame) { | 373 public boolean canRestartFrame(CallFrame callFrame) { |
| 374 return callFrame.getScript() != null; | 374 return callFrame.getScript() != null; |
| 375 } | 375 } |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 private static final String DEBUGGER_RESERVED = "debugger"; | 378 private static final String DEBUGGER_RESERVED = "debugger"; |
| 379 } | 379 } |
| OLD | NEW |