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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 DCHECK(isolate->has_pending_exception()); | 1522 DCHECK(isolate->has_pending_exception()); |
1523 return isolate->heap()->exception(); | 1523 return isolate->heap()->exception(); |
1524 } | 1524 } |
1525 context = isolate->debug()->GetDebugContext(); | 1525 context = isolate->debug()->GetDebugContext(); |
1526 } | 1526 } |
1527 if (context.is_null()) return isolate->heap()->undefined_value(); | 1527 if (context.is_null()) return isolate->heap()->undefined_value(); |
1528 context->set_security_token(isolate->native_context()->security_token()); | 1528 context->set_security_token(isolate->native_context()->security_token()); |
1529 return context->global_proxy(); | 1529 return context->global_proxy(); |
1530 } | 1530 } |
1531 | 1531 |
| 1532 RUNTIME_FUNCTION(Runtime_GetLiveEditAPIObject) { |
| 1533 HandleScope scope(isolate); |
| 1534 DCHECK(args.length() == 0); |
| 1535 |
| 1536 Handle<Context> context; |
| 1537 { |
| 1538 DebugScope debug_scope(isolate->debug()); |
| 1539 CHECK(!debug_scope.failed()); |
| 1540 context = isolate->debug()->GetDebugContext(); |
| 1541 CHECK(!context.is_null()); |
| 1542 } |
| 1543 |
| 1544 return context->native_context()->debug_live_edit(); |
| 1545 } |
1532 | 1546 |
1533 // Performs a GC. | 1547 // Performs a GC. |
1534 // Presently, it only does a full GC. | 1548 // Presently, it only does a full GC. |
1535 RUNTIME_FUNCTION(Runtime_CollectGarbage) { | 1549 RUNTIME_FUNCTION(Runtime_CollectGarbage) { |
1536 SealHandleScope shs(isolate); | 1550 SealHandleScope shs(isolate); |
1537 DCHECK(args.length() == 1); | 1551 DCHECK(args.length() == 1); |
1538 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 1552 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
1539 GarbageCollectionReason::kRuntime); | 1553 GarbageCollectionReason::kRuntime); |
1540 return isolate->heap()->undefined_value(); | 1554 return isolate->heap()->undefined_value(); |
1541 } | 1555 } |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 } | 1918 } |
1905 | 1919 |
1906 | 1920 |
1907 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1921 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1908 UNIMPLEMENTED(); | 1922 UNIMPLEMENTED(); |
1909 return NULL; | 1923 return NULL; |
1910 } | 1924 } |
1911 | 1925 |
1912 } // namespace internal | 1926 } // namespace internal |
1913 } // namespace v8 | 1927 } // namespace v8 |
OLD | NEW |