| 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 | 878 |
| 879 #endif | 879 #endif |
| 880 | 880 |
| 881 MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { | 881 MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) { |
| 882 StackGuard* stack_guard = isolate->stack_guard(); | 882 StackGuard* stack_guard = isolate->stack_guard(); |
| 883 if (stack_guard->ShouldPostponeInterrupts()) { | 883 if (stack_guard->ShouldPostponeInterrupts()) { |
| 884 return isolate->heap()->undefined_value(); | 884 return isolate->heap()->undefined_value(); |
| 885 } | 885 } |
| 886 | 886 |
| 887 if (stack_guard->IsGCRequest()) { | 887 if (stack_guard->IsGCRequest()) { |
| 888 isolate->heap()->CollectAllGarbage(false, "StackGuard GC request"); | 888 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 889 "StackGuard GC request"); |
| 889 stack_guard->Continue(GC_REQUEST); | 890 stack_guard->Continue(GC_REQUEST); |
| 890 } | 891 } |
| 891 | 892 |
| 892 isolate->counters()->stack_interrupts()->Increment(); | 893 isolate->counters()->stack_interrupts()->Increment(); |
| 893 // If FLAG_count_based_interrupts, every interrupt is a profiler interrupt. | 894 // If FLAG_count_based_interrupts, every interrupt is a profiler interrupt. |
| 894 if (FLAG_count_based_interrupts || | 895 if (FLAG_count_based_interrupts || |
| 895 stack_guard->IsRuntimeProfilerTick()) { | 896 stack_guard->IsRuntimeProfilerTick()) { |
| 896 isolate->counters()->runtime_profiler_ticks()->Increment(); | 897 isolate->counters()->runtime_profiler_ticks()->Increment(); |
| 897 stack_guard->Continue(RUNTIME_PROFILER_TICK); | 898 stack_guard->Continue(RUNTIME_PROFILER_TICK); |
| 898 isolate->runtime_profiler()->OptimizeNow(); | 899 isolate->runtime_profiler()->OptimizeNow(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 909 } | 910 } |
| 910 if (stack_guard->IsInterrupted()) { | 911 if (stack_guard->IsInterrupted()) { |
| 911 stack_guard->Continue(INTERRUPT); | 912 stack_guard->Continue(INTERRUPT); |
| 912 return isolate->StackOverflow(); | 913 return isolate->StackOverflow(); |
| 913 } | 914 } |
| 914 return isolate->heap()->undefined_value(); | 915 return isolate->heap()->undefined_value(); |
| 915 } | 916 } |
| 916 | 917 |
| 917 | 918 |
| 918 } } // namespace v8::internal | 919 } } // namespace v8::internal |
| OLD | NEW |