OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/execution.h" | 5 #include "src/execution.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 if (!maybe_result.ToHandle(&result) || !result->IsString()) { | 644 if (!maybe_result.ToHandle(&result) || !result->IsString()) { |
645 return isolate->factory()->empty_string(); | 645 return isolate->factory()->empty_string(); |
646 } | 646 } |
647 | 647 |
648 return Handle<String>::cast(result); | 648 return Handle<String>::cast(result); |
649 } | 649 } |
650 | 650 |
651 | 651 |
652 Object* StackGuard::HandleInterrupts() { | 652 Object* StackGuard::HandleInterrupts() { |
653 if (CheckAndClearInterrupt(GC_REQUEST)) { | 653 if (CheckAndClearInterrupt(GC_REQUEST)) { |
654 isolate_->heap()->CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt"); | 654 isolate_->heap()->HandleGCRequest(); |
655 } | 655 } |
656 | 656 |
657 if (CheckDebugBreak() || CheckDebugCommand()) { | 657 if (CheckDebugBreak() || CheckDebugCommand()) { |
658 isolate_->debug()->HandleDebugBreak(); | 658 isolate_->debug()->HandleDebugBreak(); |
659 } | 659 } |
660 | 660 |
661 if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) { | 661 if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) { |
662 return isolate_->TerminateExecution(); | 662 return isolate_->TerminateExecution(); |
663 } | 663 } |
664 | 664 |
(...skipping 12 matching lines...) Expand all Loading... |
677 } | 677 } |
678 | 678 |
679 isolate_->counters()->stack_interrupts()->Increment(); | 679 isolate_->counters()->stack_interrupts()->Increment(); |
680 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 680 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
681 isolate_->runtime_profiler()->OptimizeNow(); | 681 isolate_->runtime_profiler()->OptimizeNow(); |
682 | 682 |
683 return isolate_->heap()->undefined_value(); | 683 return isolate_->heap()->undefined_value(); |
684 } | 684 } |
685 | 685 |
686 } } // namespace v8::internal | 686 } } // namespace v8::internal |
OLD | NEW |