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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/debug/debug-evaluate.h" | 9 #include "src/debug/debug-evaluate.h" |
10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3); | 325 isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3); |
326 details->set(0, *value); | 326 details->set(0, *value); |
327 // TODO(verwaest): Get rid of this random way of handling interceptors. | 327 // TODO(verwaest): Get rid of this random way of handling interceptors. |
328 PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR | 328 PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR |
329 ? PropertyDetails::Empty() | 329 ? PropertyDetails::Empty() |
330 : it.property_details(); | 330 : it.property_details(); |
331 details->set(1, d.AsSmi()); | 331 details->set(1, d.AsSmi()); |
332 details->set( | 332 details->set( |
333 2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR)); | 333 2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR)); |
334 if (has_js_accessors) { | 334 if (has_js_accessors) { |
335 AccessorPair* accessors = AccessorPair::cast(*maybe_pair); | 335 Handle<AccessorPair> accessors = Handle<AccessorPair>::cast(maybe_pair); |
336 details->set(3, isolate->heap()->ToBoolean(has_caught)); | 336 details->set(3, isolate->heap()->ToBoolean(has_caught)); |
337 details->set(4, accessors->GetComponent(ACCESSOR_GETTER)); | 337 Handle<Object> getter = |
338 details->set(5, accessors->GetComponent(ACCESSOR_SETTER)); | 338 AccessorPair::GetComponent(accessors, ACCESSOR_GETTER); |
| 339 Handle<Object> setter = |
| 340 AccessorPair::GetComponent(accessors, ACCESSOR_SETTER); |
| 341 details->set(4, *getter); |
| 342 details->set(5, *setter); |
339 } | 343 } |
340 | 344 |
341 return *isolate->factory()->NewJSArrayWithElements(details); | 345 return *isolate->factory()->NewJSArrayWithElements(details); |
342 } | 346 } |
343 | 347 |
344 | 348 |
345 RUNTIME_FUNCTION(Runtime_DebugGetProperty) { | 349 RUNTIME_FUNCTION(Runtime_DebugGetProperty) { |
346 HandleScope scope(isolate); | 350 HandleScope scope(isolate); |
347 | 351 |
348 DCHECK(args.length() == 2); | 352 DCHECK(args.length() == 2); |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 return Smi::FromInt(isolate->debug()->is_active()); | 1673 return Smi::FromInt(isolate->debug()->is_active()); |
1670 } | 1674 } |
1671 | 1675 |
1672 | 1676 |
1673 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1677 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1674 UNIMPLEMENTED(); | 1678 UNIMPLEMENTED(); |
1675 return NULL; | 1679 return NULL; |
1676 } | 1680 } |
1677 } // namespace internal | 1681 } // namespace internal |
1678 } // namespace v8 | 1682 } // namespace v8 |
OLD | NEW |