| 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 12602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12613 // Get the step action and check validity. | 12613 // Get the step action and check validity. |
| 12614 StepAction step_action = static_cast<StepAction>(NumberToInt32(args[1])); | 12614 StepAction step_action = static_cast<StepAction>(NumberToInt32(args[1])); |
| 12615 if (step_action != StepIn && | 12615 if (step_action != StepIn && |
| 12616 step_action != StepNext && | 12616 step_action != StepNext && |
| 12617 step_action != StepOut && | 12617 step_action != StepOut && |
| 12618 step_action != StepInMin && | 12618 step_action != StepInMin && |
| 12619 step_action != StepMin) { | 12619 step_action != StepMin) { |
| 12620 return isolate->Throw(isolate->heap()->illegal_argument_string()); | 12620 return isolate->Throw(isolate->heap()->illegal_argument_string()); |
| 12621 } | 12621 } |
| 12622 | 12622 |
| 12623 if (frame_id != StackFrame::NO_ID && | 12623 if (frame_id != StackFrame::NO_ID && step_action != StepNext && |
| 12624 step_action != StepIn && | 12624 step_action != StepMin && step_action != StepOut) { |
| 12625 step_action != StepNext && | |
| 12626 step_action != StepOut && | |
| 12627 step_action != StepMin) { | |
| 12628 return isolate->ThrowIllegalOperation(); | 12625 return isolate->ThrowIllegalOperation(); |
| 12629 } | 12626 } |
| 12630 | 12627 |
| 12631 // Get the number of steps. | 12628 // Get the number of steps. |
| 12632 int step_count = NumberToInt32(args[2]); | 12629 int step_count = NumberToInt32(args[2]); |
| 12633 if (step_count < 1) { | 12630 if (step_count < 1) { |
| 12634 return isolate->Throw(isolate->heap()->illegal_argument_string()); | 12631 return isolate->Throw(isolate->heap()->illegal_argument_string()); |
| 12635 } | 12632 } |
| 12636 | 12633 |
| 12637 // Clear all current stepping setup. | 12634 // Clear all current stepping setup. |
| (...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14819 // Handle last resort GC and make sure to allow future allocations | 14816 // Handle last resort GC and make sure to allow future allocations |
| 14820 // to grow the heap without causing GCs (if possible). | 14817 // to grow the heap without causing GCs (if possible). |
| 14821 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14818 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14822 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14819 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14823 "Runtime::PerformGC"); | 14820 "Runtime::PerformGC"); |
| 14824 } | 14821 } |
| 14825 } | 14822 } |
| 14826 | 14823 |
| 14827 | 14824 |
| 14828 } } // namespace v8::internal | 14825 } } // namespace v8::internal |
| OLD | NEW |