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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 // and keep step count queued up in the meantime. | 982 // and keep step count queued up in the meantime. |
983 if (step_action == StepNext && frame->fp() < thread_local_.last_fp_) { | 983 if (step_action == StepNext && frame->fp() < thread_local_.last_fp_) { |
984 // Count frames until target frame | 984 // Count frames until target frame |
985 int count = 0; | 985 int count = 0; |
986 JavaScriptFrameIterator it(isolate_); | 986 JavaScriptFrameIterator it(isolate_); |
987 while (!it.done() && it.frame()->fp() != thread_local_.last_fp_) { | 987 while (!it.done() && it.frame()->fp() != thread_local_.last_fp_) { |
988 count++; | 988 count++; |
989 it.Advance(); | 989 it.Advance(); |
990 } | 990 } |
991 | 991 |
992 // If we found original frame | 992 // Check that we indeed found the frame we are looking for. |
993 if (it.frame()->fp() == thread_local_.last_fp_) { | 993 CHECK(!it.done() && (it.frame()->fp() == thread_local_.last_fp_)); |
994 if (step_count > 1) { | 994 if (step_count > 1) { |
995 // Save old count and action to continue stepping after | 995 // Save old count and action to continue stepping after |
996 // StepOut | 996 // StepOut |
997 thread_local_.queued_step_count_ = step_count - 1; | 997 thread_local_.queued_step_count_ = step_count - 1; |
998 } | 998 } |
999 | 999 |
1000 // Set up for StepOut to reach target frame | 1000 // Set up for StepOut to reach target frame |
1001 step_action = StepOut; | 1001 step_action = StepOut; |
1002 step_count = count; | 1002 step_count = count; |
1003 } | |
1004 } | 1003 } |
1005 | 1004 |
1006 // Clear all current stepping setup. | 1005 // Clear all current stepping setup. |
1007 ClearStepping(); | 1006 ClearStepping(); |
1008 | 1007 |
1009 // Set up for the remaining steps. | 1008 // Set up for the remaining steps. |
1010 PrepareStep(step_action, step_count); | 1009 PrepareStep(step_action, step_count); |
1011 } | 1010 } |
1012 | 1011 |
1013 if (thread_local_.frame_drop_mode_ == FRAMES_UNTOUCHED) { | 1012 if (thread_local_.frame_drop_mode_ == FRAMES_UNTOUCHED) { |
(...skipping 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3582 { | 3581 { |
3583 Locker locker; | 3582 Locker locker; |
3584 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3583 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
3585 } | 3584 } |
3586 } | 3585 } |
3587 } | 3586 } |
3588 | 3587 |
3589 #endif // ENABLE_DEBUGGER_SUPPORT | 3588 #endif // ENABLE_DEBUGGER_SUPPORT |
3590 | 3589 |
3591 } } // namespace v8::internal | 3590 } } // namespace v8::internal |
OLD | NEW |