OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
819 // Just continue if breaks are disabled. | 819 // Just continue if breaks are disabled. |
820 if (isolate->debug()->disable_break()) { | 820 if (isolate->debug()->disable_break()) { |
821 return isolate->heap()->undefined_value(); | 821 return isolate->heap()->undefined_value(); |
822 } | 822 } |
823 | 823 |
824 // Ignore debug break during bootstrapping. | 824 // Ignore debug break during bootstrapping. |
825 if (isolate->bootstrapper()->IsActive()) { | 825 if (isolate->bootstrapper()->IsActive()) { |
826 return isolate->heap()->undefined_value(); | 826 return isolate->heap()->undefined_value(); |
827 } | 827 } |
828 | 828 |
829 StackLimitCheck check(isolate); | |
Michael Starzinger
2012/04/03 13:31:32
As discussed offline, those are just "better-safe-
danno
2012/04/03 13:41:28
Done.
| |
830 if (check.HasOverflowed()) { | |
831 return isolate->heap()->undefined_value(); | |
832 } | |
833 | |
829 { | 834 { |
830 JavaScriptFrameIterator it(isolate); | 835 JavaScriptFrameIterator it(isolate); |
831 ASSERT(!it.done()); | 836 ASSERT(!it.done()); |
832 Object* fun = it.frame()->function(); | 837 Object* fun = it.frame()->function(); |
833 if (fun && fun->IsJSFunction()) { | 838 if (fun && fun->IsJSFunction()) { |
834 // Don't stop in builtin functions. | 839 // Don't stop in builtin functions. |
835 if (JSFunction::cast(fun)->IsBuiltin()) { | 840 if (JSFunction::cast(fun)->IsBuiltin()) { |
836 return isolate->heap()->undefined_value(); | 841 return isolate->heap()->undefined_value(); |
837 } | 842 } |
838 GlobalObject* global = JSFunction::cast(fun)->context()->global(); | 843 GlobalObject* global = JSFunction::cast(fun)->context()->global(); |
(...skipping 16 matching lines...) Expand all Loading... | |
855 | 860 |
856 // Return to continue execution. | 861 // Return to continue execution. |
857 return isolate->heap()->undefined_value(); | 862 return isolate->heap()->undefined_value(); |
858 } | 863 } |
859 | 864 |
860 void Execution::ProcessDebugMessages(bool debug_command_only) { | 865 void Execution::ProcessDebugMessages(bool debug_command_only) { |
861 Isolate* isolate = Isolate::Current(); | 866 Isolate* isolate = Isolate::Current(); |
862 // Clear the debug command request flag. | 867 // Clear the debug command request flag. |
863 isolate->stack_guard()->Continue(DEBUGCOMMAND); | 868 isolate->stack_guard()->Continue(DEBUGCOMMAND); |
864 | 869 |
870 StackLimitCheck check(isolate); | |
Michael Starzinger
2012/04/03 13:31:32
Likewise.
danno
2012/04/03 13:41:28
Done.
| |
871 if (check.HasOverflowed()) { | |
872 return; | |
873 } | |
874 | |
865 HandleScope scope(isolate); | 875 HandleScope scope(isolate); |
866 // Enter the debugger. Just continue if we fail to enter the debugger. | 876 // Enter the debugger. Just continue if we fail to enter the debugger. |
867 EnterDebugger debugger; | 877 EnterDebugger debugger; |
868 if (debugger.FailedToEnter()) { | 878 if (debugger.FailedToEnter()) { |
869 return; | 879 return; |
870 } | 880 } |
871 | 881 |
872 // Notify the debug event listeners. Indicate auto continue if the break was | 882 // Notify the debug event listeners. Indicate auto continue if the break was |
873 // a debug command break. | 883 // a debug command break. |
874 isolate->debugger()->OnDebugBreak(isolate->factory()->undefined_value(), | 884 isolate->debugger()->OnDebugBreak(isolate->factory()->undefined_value(), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
910 } | 920 } |
911 if (stack_guard->IsInterrupted()) { | 921 if (stack_guard->IsInterrupted()) { |
912 stack_guard->Continue(INTERRUPT); | 922 stack_guard->Continue(INTERRUPT); |
913 return isolate->StackOverflow(); | 923 return isolate->StackOverflow(); |
914 } | 924 } |
915 return isolate->heap()->undefined_value(); | 925 return isolate->heap()->undefined_value(); |
916 } | 926 } |
917 | 927 |
918 | 928 |
919 } } // namespace v8::internal | 929 } } // namespace v8::internal |
OLD | NEW |