Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 JavaScriptFrameIterator it(isolate); | 23 JavaScriptFrameIterator it(isolate); | 
| 24 isolate->debug()->Break(args, it.frame()); | 24 isolate->debug()->Break(args, it.frame()); | 
| 25 isolate->debug()->SetAfterBreakTarget(it.frame()); | 25 isolate->debug()->SetAfterBreakTarget(it.frame()); | 
| 26 return isolate->heap()->undefined_value(); | 26 return isolate->heap()->undefined_value(); | 
| 27 } | 27 } | 
| 28 | 28 | 
| 29 | 29 | 
| 30 RUNTIME_FUNCTION(Runtime_HandleDebuggerStatement) { | 30 RUNTIME_FUNCTION(Runtime_HandleDebuggerStatement) { | 
| 31 SealHandleScope shs(isolate); | 31 SealHandleScope shs(isolate); | 
| 32 DCHECK(args.length() == 0); | 32 DCHECK(args.length() == 0); | 
| 33 isolate->debug()->HandleDebugBreak(); | 33 if (isolate->debug()->break_points_active()) | 
| 
 
Yang
2016/02/12 20:17:41
Please add curly brackets.
 
kozy
2016/02/12 20:29:07
Done.
 
 | |
| 34 isolate->debug()->HandleDebugBreak(); | |
| 34 return isolate->heap()->undefined_value(); | 35 return isolate->heap()->undefined_value(); | 
| 35 } | 36 } | 
| 36 | 37 | 
| 37 | 38 | 
| 38 // Adds a JavaScript function as a debug event listener. | 39 // Adds a JavaScript function as a debug event listener. | 
| 39 // args[0]: debug event listener function to set or null or undefined for | 40 // args[0]: debug event listener function to set or null or undefined for | 
| 40 // clearing the event listener function | 41 // clearing the event listener function | 
| 41 // args[1]: object supplied during callback | 42 // args[1]: object supplied during callback | 
| 42 RUNTIME_FUNCTION(Runtime_SetDebugEventListener) { | 43 RUNTIME_FUNCTION(Runtime_SetDebugEventListener) { | 
| 43 SealHandleScope shs(isolate); | 44 SealHandleScope shs(isolate); | 
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1673 return Smi::FromInt(isolate->debug()->is_active()); | 1674 return Smi::FromInt(isolate->debug()->is_active()); | 
| 1674 } | 1675 } | 
| 1675 | 1676 | 
| 1676 | 1677 | 
| 1677 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1678 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 
| 1678 UNIMPLEMENTED(); | 1679 UNIMPLEMENTED(); | 
| 1679 return NULL; | 1680 return NULL; | 
| 1680 } | 1681 } | 
| 1681 } // namespace internal | 1682 } // namespace internal | 
| 1682 } // namespace v8 | 1683 } // namespace v8 | 
| OLD | NEW |