OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 // At this point we cannot create an Error object using its javascript | 826 // At this point we cannot create an Error object using its javascript |
827 // constructor. Instead, we copy the pre-constructed boilerplate and | 827 // constructor. Instead, we copy the pre-constructed boilerplate and |
828 // attach the stack trace as a hidden property. | 828 // attach the stack trace as a hidden property. |
829 Handle<String> key = factory()->stack_overflow_string(); | 829 Handle<String> key = factory()->stack_overflow_string(); |
830 Handle<JSObject> boilerplate = Handle<JSObject>::cast( | 830 Handle<JSObject> boilerplate = Handle<JSObject>::cast( |
831 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); | 831 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); |
832 Handle<JSObject> exception = factory()->CopyJSObject(boilerplate); | 832 Handle<JSObject> exception = factory()->CopyJSObject(boilerplate); |
833 Throw(*exception, nullptr); | 833 Throw(*exception, nullptr); |
834 | 834 |
835 CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value()); | 835 CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value()); |
| 836 #ifdef VERIFY_HEAP |
| 837 if (FLAG_verify_heap && FLAG_stress_compaction) { |
| 838 heap()->CollectAllAvailableGarbage("trigger compaction"); |
| 839 } |
| 840 #endif // VERIFY_HEAP |
| 841 |
836 return heap()->exception(); | 842 return heap()->exception(); |
837 } | 843 } |
838 | 844 |
839 | 845 |
840 Object* Isolate::TerminateExecution() { | 846 Object* Isolate::TerminateExecution() { |
841 return Throw(heap_.termination_exception(), nullptr); | 847 return Throw(heap_.termination_exception(), nullptr); |
842 } | 848 } |
843 | 849 |
844 | 850 |
845 void Isolate::CancelTerminateExecution() { | 851 void Isolate::CancelTerminateExecution() { |
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 if (prev_ && prev_->Intercept(flag)) return true; | 2661 if (prev_ && prev_->Intercept(flag)) return true; |
2656 // Then check whether this scope intercepts. | 2662 // Then check whether this scope intercepts. |
2657 if ((flag & intercept_mask_)) { | 2663 if ((flag & intercept_mask_)) { |
2658 intercepted_flags_ |= flag; | 2664 intercepted_flags_ |= flag; |
2659 return true; | 2665 return true; |
2660 } | 2666 } |
2661 return false; | 2667 return false; |
2662 } | 2668 } |
2663 | 2669 |
2664 } } // namespace v8::internal | 2670 } } // namespace v8::internal |
OLD | NEW |