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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 Object* PromoteScheduledException(); | 794 Object* PromoteScheduledException(); |
795 void DoThrow(Object* exception, MessageLocation* location); | 795 void DoThrow(Object* exception, MessageLocation* location); |
796 // Checks if exception should be reported and finds out if it's | 796 // Checks if exception should be reported and finds out if it's |
797 // caught externally. | 797 // caught externally. |
798 bool ShouldReportException(bool* can_be_caught_externally, | 798 bool ShouldReportException(bool* can_be_caught_externally, |
799 bool catchable_by_javascript); | 799 bool catchable_by_javascript); |
800 | 800 |
801 // Attempts to compute the current source location, storing the | 801 // Attempts to compute the current source location, storing the |
802 // result in the target out parameter. | 802 // result in the target out parameter. |
803 void ComputeLocation(MessageLocation* target); | 803 void ComputeLocation(MessageLocation* target); |
804 void ComputeLocationFromStackTrace(MessageLocation* target, | |
805 Handle<Object> exception); | |
806 | |
807 Handle<JSMessageObject> CreateMessage(Handle<Object> exception, | |
808 MessageLocation* location); | |
809 | 804 |
810 // Out of resource exception helpers. | 805 // Out of resource exception helpers. |
811 Object* StackOverflow(); | 806 Object* StackOverflow(); |
812 Object* TerminateExecution(); | 807 Object* TerminateExecution(); |
813 void CancelTerminateExecution(); | 808 void CancelTerminateExecution(); |
814 | 809 |
815 void InvokeApiInterruptCallback(); | 810 void InvokeApiInterruptCallback(); |
816 | 811 |
817 // Administration | 812 // Administration |
818 void Iterate(ObjectVisitor* v); | 813 void Iterate(ObjectVisitor* v); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 void MarkCompactEpilogue(bool is_compacting, | 1194 void MarkCompactEpilogue(bool is_compacting, |
1200 ThreadLocalTop* archived_thread_data); | 1195 ThreadLocalTop* archived_thread_data); |
1201 | 1196 |
1202 void FillCache(); | 1197 void FillCache(); |
1203 | 1198 |
1204 // Propagate pending exception message to the v8::TryCatch. | 1199 // Propagate pending exception message to the v8::TryCatch. |
1205 // If there is no external try-catch or message was successfully propagated, | 1200 // If there is no external try-catch or message was successfully propagated, |
1206 // then return true. | 1201 // then return true. |
1207 bool PropagatePendingExceptionToExternalTryCatch(); | 1202 bool PropagatePendingExceptionToExternalTryCatch(); |
1208 | 1203 |
| 1204 Handle<JSMessageObject> CreateMessage(Handle<Object> exception, |
| 1205 MessageLocation* location); |
| 1206 |
1209 // Traverse prototype chain to find out whether the object is derived from | 1207 // Traverse prototype chain to find out whether the object is derived from |
1210 // the Error object. | 1208 // the Error object. |
1211 bool IsErrorObject(Handle<Object> obj); | 1209 bool IsErrorObject(Handle<Object> obj); |
1212 | 1210 |
1213 base::Atomic32 id_; | 1211 base::Atomic32 id_; |
1214 EntryStackItem* entry_stack_; | 1212 EntryStackItem* entry_stack_; |
1215 int stack_trace_nesting_level_; | 1213 int stack_trace_nesting_level_; |
1216 StringStream* incomplete_message_; | 1214 StringStream* incomplete_message_; |
1217 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1215 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
1218 Bootstrapper* bootstrapper_; | 1216 Bootstrapper* bootstrapper_; |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 } | 1536 } |
1539 | 1537 |
1540 EmbeddedVector<char, 128> filename_; | 1538 EmbeddedVector<char, 128> filename_; |
1541 FILE* file_; | 1539 FILE* file_; |
1542 int scope_depth_; | 1540 int scope_depth_; |
1543 }; | 1541 }; |
1544 | 1542 |
1545 } } // namespace v8::internal | 1543 } } // namespace v8::internal |
1546 | 1544 |
1547 #endif // V8_ISOLATE_H_ | 1545 #endif // V8_ISOLATE_H_ |
OLD | NEW |