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-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 Handle<String> status_str = factory->NewStringFromAsciiChecked(status); | 266 Handle<String> status_str = factory->NewStringFromAsciiChecked(status); |
267 result->set(1, *status_str); | 267 result->set(1, *status_str); |
268 | 268 |
269 Handle<Object> value_obj = | 269 Handle<Object> value_obj = |
270 DebugGetProperty(promise, isolate->factory()->promise_value_symbol()); | 270 DebugGetProperty(promise, isolate->factory()->promise_value_symbol()); |
271 Handle<String> promise_value = | 271 Handle<String> promise_value = |
272 factory->NewStringFromAsciiChecked("[[PromiseValue]]"); | 272 factory->NewStringFromAsciiChecked("[[PromiseValue]]"); |
273 result->set(2, *promise_value); | 273 result->set(2, *promise_value); |
274 result->set(3, *value_obj); | 274 result->set(3, *value_obj); |
275 return factory->NewJSArrayWithElements(result); | 275 return factory->NewJSArrayWithElements(result); |
| 276 } else if (object->IsJSProxy()) { |
| 277 Handle<JSProxy> js_proxy = Handle<JSProxy>::cast(object); |
| 278 Handle<FixedArray> result = factory->NewFixedArray(3 * 2); |
| 279 |
| 280 Handle<String> handler_str = |
| 281 factory->NewStringFromAsciiChecked("[[Handler]]"); |
| 282 result->set(0, *handler_str); |
| 283 result->set(1, js_proxy->handler()); |
| 284 |
| 285 Handle<String> target_str = |
| 286 factory->NewStringFromAsciiChecked("[[Target]]"); |
| 287 result->set(2, *target_str); |
| 288 result->set(3, js_proxy->target()); |
| 289 |
| 290 Handle<String> is_revoked_str = |
| 291 factory->NewStringFromAsciiChecked("[[IsRevoked]]"); |
| 292 result->set(4, *is_revoked_str); |
| 293 result->set(5, isolate->heap()->ToBoolean(js_proxy->IsRevoked())); |
| 294 return factory->NewJSArrayWithElements(result); |
276 } else if (object->IsJSValue()) { | 295 } else if (object->IsJSValue()) { |
277 Handle<JSValue> js_value = Handle<JSValue>::cast(object); | 296 Handle<JSValue> js_value = Handle<JSValue>::cast(object); |
278 | 297 |
279 Handle<FixedArray> result = factory->NewFixedArray(2); | 298 Handle<FixedArray> result = factory->NewFixedArray(2); |
280 Handle<String> primitive_value = | 299 Handle<String> primitive_value = |
281 factory->NewStringFromAsciiChecked("[[PrimitiveValue]]"); | 300 factory->NewStringFromAsciiChecked("[[PrimitiveValue]]"); |
282 result->set(0, *primitive_value); | 301 result->set(0, *primitive_value); |
283 result->set(1, js_value->value()); | 302 result->set(1, js_value->value()); |
284 return factory->NewJSArrayWithElements(result); | 303 return factory->NewJSArrayWithElements(result); |
285 } | 304 } |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 return Smi::FromInt(isolate->debug()->is_active()); | 1545 return Smi::FromInt(isolate->debug()->is_active()); |
1527 } | 1546 } |
1528 | 1547 |
1529 | 1548 |
1530 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1549 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1531 UNIMPLEMENTED(); | 1550 UNIMPLEMENTED(); |
1532 return NULL; | 1551 return NULL; |
1533 } | 1552 } |
1534 } // namespace internal | 1553 } // namespace internal |
1535 } // namespace v8 | 1554 } // namespace v8 |
OLD | NEW |