| 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 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2826 isolate, result, | 2826 isolate, result, |
| 2827 Execution::Call(isolate, function, handle(function->global_proxy()), 0, | 2827 Execution::Call(isolate, function, handle(function->global_proxy()), 0, |
| 2828 NULL)); | 2828 NULL)); |
| 2829 return *result; | 2829 return *result; |
| 2830 } | 2830 } |
| 2831 | 2831 |
| 2832 | 2832 |
| 2833 RUNTIME_FUNCTION(Runtime_GetDebugContext) { | 2833 RUNTIME_FUNCTION(Runtime_GetDebugContext) { |
| 2834 HandleScope scope(isolate); | 2834 HandleScope scope(isolate); |
| 2835 DCHECK(args.length() == 0); | 2835 DCHECK(args.length() == 0); |
| 2836 Handle<Context> context = isolate->debug()->GetDebugContext(); | 2836 Handle<Context> context; |
| 2837 { |
| 2838 DebugScope debug_scope(isolate->debug()); |
| 2839 context = isolate->debug()->GetDebugContext(); |
| 2840 } |
| 2837 if (context.is_null()) return isolate->heap()->undefined_value(); | 2841 if (context.is_null()) return isolate->heap()->undefined_value(); |
| 2838 context->set_security_token(isolate->native_context()->security_token()); | 2842 context->set_security_token(isolate->native_context()->security_token()); |
| 2839 return context->global_proxy(); | 2843 return context->global_proxy(); |
| 2840 } | 2844 } |
| 2841 | 2845 |
| 2842 | 2846 |
| 2843 // Performs a GC. | 2847 // Performs a GC. |
| 2844 // Presently, it only does a full GC. | 2848 // Presently, it only does a full GC. |
| 2845 RUNTIME_FUNCTION(Runtime_CollectGarbage) { | 2849 RUNTIME_FUNCTION(Runtime_CollectGarbage) { |
| 2846 SealHandleScope shs(isolate); | 2850 SealHandleScope shs(isolate); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 return Smi::FromInt(isolate->debug()->is_active()); | 2985 return Smi::FromInt(isolate->debug()->is_active()); |
| 2982 } | 2986 } |
| 2983 | 2987 |
| 2984 | 2988 |
| 2985 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 2989 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 2986 UNIMPLEMENTED(); | 2990 UNIMPLEMENTED(); |
| 2987 return NULL; | 2991 return NULL; |
| 2988 } | 2992 } |
| 2989 } | 2993 } |
| 2990 } // namespace v8::internal | 2994 } // namespace v8::internal |
| OLD | NEW |