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