| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // could have the assumption that its own native context is the current | 299 // could have the assumption that its own native context is the current |
| 300 // context and not some internal debugger context. | 300 // context and not some internal debugger context. |
| 301 SaveContext save(isolate); | 301 SaveContext save(isolate); |
| 302 if (isolate->debug()->in_debug_scope()) { | 302 if (isolate->debug()->in_debug_scope()) { |
| 303 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext()); | 303 isolate->set_context(*isolate->debug()->debugger_entry()->GetContext()); |
| 304 } | 304 } |
| 305 | 305 |
| 306 // Check if the name is trivially convertible to an index and get the element | 306 // Check if the name is trivially convertible to an index and get the element |
| 307 // if so. | 307 // if so. |
| 308 uint32_t index; | 308 uint32_t index; |
| 309 // TODO(verwaest): Make sure DebugGetProperty can handle arrays, and remove |
| 310 // this special case. |
| 309 if (name->AsArrayIndex(&index)) { | 311 if (name->AsArrayIndex(&index)) { |
| 310 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2); | 312 Handle<FixedArray> details = isolate->factory()->NewFixedArray(2); |
| 311 Handle<Object> element_or_char; | 313 Handle<Object> element_or_char; |
| 312 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 314 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 313 isolate, element_or_char, | 315 isolate, element_or_char, |
| 314 Runtime::GetElementOrCharAt(isolate, obj, index)); | 316 Runtime::GetElementOrCharAt(isolate, obj, index)); |
| 315 details->set(0, *element_or_char); | 317 details->set(0, *element_or_char); |
| 316 details->set(1, PropertyDetails::Empty().AsSmi()); | 318 details->set(1, PropertyDetails::Empty().AsSmi()); |
| 317 return *isolate->factory()->NewJSArrayWithElements(details); | 319 return *isolate->factory()->NewJSArrayWithElements(details); |
| 318 } | 320 } |
| (...skipping 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 return Smi::FromInt(isolate->debug()->is_active()); | 3180 return Smi::FromInt(isolate->debug()->is_active()); |
| 3179 } | 3181 } |
| 3180 | 3182 |
| 3181 | 3183 |
| 3182 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 3184 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 3183 UNIMPLEMENTED(); | 3185 UNIMPLEMENTED(); |
| 3184 return NULL; | 3186 return NULL; |
| 3185 } | 3187 } |
| 3186 } // namespace internal | 3188 } // namespace internal |
| 3187 } // namespace v8 | 3189 } // namespace v8 |
| OLD | NEW |