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 12592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12603 // Get the step action and check validity. | 12603 // Get the step action and check validity. |
12604 StepAction step_action = static_cast<StepAction>(NumberToInt32(args[1])); | 12604 StepAction step_action = static_cast<StepAction>(NumberToInt32(args[1])); |
12605 if (step_action != StepIn && | 12605 if (step_action != StepIn && |
12606 step_action != StepNext && | 12606 step_action != StepNext && |
12607 step_action != StepOut && | 12607 step_action != StepOut && |
12608 step_action != StepInMin && | 12608 step_action != StepInMin && |
12609 step_action != StepMin) { | 12609 step_action != StepMin) { |
12610 return isolate->Throw(isolate->heap()->illegal_argument_string()); | 12610 return isolate->Throw(isolate->heap()->illegal_argument_string()); |
12611 } | 12611 } |
12612 | 12612 |
12613 if (frame_id != StackFrame::NO_ID && step_action != StepNext && | 12613 if (frame_id != StackFrame::NO_ID && |
12614 step_action != StepMin && step_action != StepOut) { | 12614 step_action != StepIn && |
| 12615 step_action != StepNext && |
| 12616 step_action != StepOut && |
| 12617 step_action != StepMin) { |
12615 return isolate->ThrowIllegalOperation(); | 12618 return isolate->ThrowIllegalOperation(); |
12616 } | 12619 } |
12617 | 12620 |
12618 // Get the number of steps. | 12621 // Get the number of steps. |
12619 int step_count = NumberToInt32(args[2]); | 12622 int step_count = NumberToInt32(args[2]); |
12620 if (step_count < 1) { | 12623 if (step_count < 1) { |
12621 return isolate->Throw(isolate->heap()->illegal_argument_string()); | 12624 return isolate->Throw(isolate->heap()->illegal_argument_string()); |
12622 } | 12625 } |
12623 | 12626 |
12624 // Clear all current stepping setup. | 12627 // Clear all current stepping setup. |
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14806 // Handle last resort GC and make sure to allow future allocations | 14809 // Handle last resort GC and make sure to allow future allocations |
14807 // to grow the heap without causing GCs (if possible). | 14810 // to grow the heap without causing GCs (if possible). |
14808 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14811 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14809 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14812 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14810 "Runtime::PerformGC"); | 14813 "Runtime::PerformGC"); |
14811 } | 14814 } |
14812 } | 14815 } |
14813 | 14816 |
14814 | 14817 |
14815 } } // namespace v8::internal | 14818 } } // namespace v8::internal |
OLD | NEW |