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 args); | 644 args); |
645 Handle<Object> result; | 645 Handle<Object> result; |
646 if (!maybe_result.ToHandle(&result) || !result->IsString()) { | 646 if (!maybe_result.ToHandle(&result) || !result->IsString()) { |
647 return isolate->factory()->empty_string(); | 647 return isolate->factory()->empty_string(); |
648 } | 648 } |
649 | 649 |
650 return Handle<String>::cast(result); | 650 return Handle<String>::cast(result); |
651 } | 651 } |
652 | 652 |
653 | 653 |
| 654 void StackGuard::CheckAndHandleGCInterrupt() { |
| 655 if (CheckAndClearInterrupt(GC_REQUEST)) { |
| 656 isolate_->heap()->HandleGCRequest(); |
| 657 } |
| 658 } |
| 659 |
| 660 |
654 Object* StackGuard::HandleInterrupts() { | 661 Object* StackGuard::HandleInterrupts() { |
655 if (CheckAndClearInterrupt(GC_REQUEST)) { | 662 if (CheckAndClearInterrupt(GC_REQUEST)) { |
656 isolate_->heap()->HandleGCRequest(); | 663 isolate_->heap()->HandleGCRequest(); |
657 } | 664 } |
658 | 665 |
659 if (CheckDebugBreak() || CheckDebugCommand()) { | 666 if (CheckDebugBreak() || CheckDebugCommand()) { |
660 isolate_->debug()->HandleDebugBreak(); | 667 isolate_->debug()->HandleDebugBreak(); |
661 } | 668 } |
662 | 669 |
663 if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) { | 670 if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) { |
(...skipping 15 matching lines...) Expand all Loading... |
679 } | 686 } |
680 | 687 |
681 isolate_->counters()->stack_interrupts()->Increment(); | 688 isolate_->counters()->stack_interrupts()->Increment(); |
682 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 689 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
683 isolate_->runtime_profiler()->OptimizeNow(); | 690 isolate_->runtime_profiler()->OptimizeNow(); |
684 | 691 |
685 return isolate_->heap()->undefined_value(); | 692 return isolate_->heap()->undefined_value(); |
686 } | 693 } |
687 | 694 |
688 } } // namespace v8::internal | 695 } } // namespace v8::internal |
OLD | NEW |