| 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 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2639   DebugScope debug_scope(isolate->debug()); | 2639   DebugScope debug_scope(isolate->debug()); | 
| 2640   Handle<Object> result; | 2640   Handle<Object> result; | 
| 2641   ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 2641   ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 
| 2642       isolate, result, | 2642       isolate, result, | 
| 2643       Execution::Call(isolate, function, handle(function->global_proxy()), 0, | 2643       Execution::Call(isolate, function, handle(function->global_proxy()), 0, | 
| 2644                       NULL)); | 2644                       NULL)); | 
| 2645   return *result; | 2645   return *result; | 
| 2646 } | 2646 } | 
| 2647 | 2647 | 
| 2648 | 2648 | 
|  | 2649 RUNTIME_FUNCTION(Runtime_GetDebugContext) { | 
|  | 2650   HandleScope scope(isolate); | 
|  | 2651   DCHECK(args.length() == 0); | 
|  | 2652   Handle<Context> context = isolate->debug()->GetDebugContext(); | 
|  | 2653   context->set_security_token(isolate->native_context()->security_token()); | 
|  | 2654   return context->global_proxy(); | 
|  | 2655 } | 
|  | 2656 | 
|  | 2657 | 
| 2649 // Performs a GC. | 2658 // Performs a GC. | 
| 2650 // Presently, it only does a full GC. | 2659 // Presently, it only does a full GC. | 
| 2651 RUNTIME_FUNCTION(Runtime_CollectGarbage) { | 2660 RUNTIME_FUNCTION(Runtime_CollectGarbage) { | 
| 2652   SealHandleScope shs(isolate); | 2661   SealHandleScope shs(isolate); | 
| 2653   DCHECK(args.length() == 1); | 2662   DCHECK(args.length() == 1); | 
| 2654   isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "%CollectGarbage"); | 2663   isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "%CollectGarbage"); | 
| 2655   return isolate->heap()->undefined_value(); | 2664   return isolate->heap()->undefined_value(); | 
| 2656 } | 2665 } | 
| 2657 | 2666 | 
| 2658 | 2667 | 
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2787   return Smi::FromInt(isolate->debug()->is_active()); | 2796   return Smi::FromInt(isolate->debug()->is_active()); | 
| 2788 } | 2797 } | 
| 2789 | 2798 | 
| 2790 | 2799 | 
| 2791 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 2800 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 
| 2792   UNIMPLEMENTED(); | 2801   UNIMPLEMENTED(); | 
| 2793   return NULL; | 2802   return NULL; | 
| 2794 } | 2803 } | 
| 2795 } | 2804 } | 
| 2796 }  // namespace v8::internal | 2805 }  // namespace v8::internal | 
| OLD | NEW | 
|---|