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 <queue> | 8 #include <queue> |
9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 Throw(*exception, location); | 757 Throw(*exception, location); |
758 return MaybeHandle<T>(); | 758 return MaybeHandle<T>(); |
759 } | 759 } |
760 | 760 |
761 // Re-throw an exception. This involves no error reporting since error | 761 // Re-throw an exception. This involves no error reporting since error |
762 // reporting was handled when the exception was thrown originally. | 762 // reporting was handled when the exception was thrown originally. |
763 Object* ReThrow(Object* exception); | 763 Object* ReThrow(Object* exception); |
764 | 764 |
765 // Find the correct handler for the current pending exception. This also | 765 // Find the correct handler for the current pending exception. This also |
766 // clears and returns the current pending exception. | 766 // clears and returns the current pending exception. |
767 Object* FindHandler(); | 767 Object* UnwindAndFindHandler(); |
768 | 768 |
769 // Tries to predict whether an exception will be caught. Note that this can | 769 // Tries to predict whether an exception will be caught. Note that this can |
770 // only produce an estimate, because it is undecidable whether a finally | 770 // only produce an estimate, because it is undecidable whether a finally |
771 // clause will consume or re-throw an exception. We conservatively assume any | 771 // clause will consume or re-throw an exception. We conservatively assume any |
772 // finally clause will behave as if the exception were consumed. | 772 // finally clause will behave as if the exception were consumed. |
773 enum CatchType { NOT_CAUGHT, CAUGHT_BY_JAVASCRIPT, CAUGHT_BY_EXTERNAL }; | 773 enum CatchType { NOT_CAUGHT, CAUGHT_BY_JAVASCRIPT, CAUGHT_BY_EXTERNAL }; |
774 CatchType PredictExceptionCatcher(); | 774 CatchType PredictExceptionCatcher(); |
775 | 775 |
776 void ScheduleThrow(Object* exception); | 776 void ScheduleThrow(Object* exception); |
777 // Re-set pending message, script and positions reported to the TryCatch | 777 // Re-set pending message, script and positions reported to the TryCatch |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 void MarkCompactEpilogue(bool is_compacting, | 1247 void MarkCompactEpilogue(bool is_compacting, |
1248 ThreadLocalTop* archived_thread_data); | 1248 ThreadLocalTop* archived_thread_data); |
1249 | 1249 |
1250 void FillCache(); | 1250 void FillCache(); |
1251 | 1251 |
1252 // Propagate pending exception message to the v8::TryCatch. | 1252 // Propagate pending exception message to the v8::TryCatch. |
1253 // If there is no external try-catch or message was successfully propagated, | 1253 // If there is no external try-catch or message was successfully propagated, |
1254 // then return true. | 1254 // then return true. |
1255 bool PropagatePendingExceptionToExternalTryCatch(); | 1255 bool PropagatePendingExceptionToExternalTryCatch(); |
1256 | 1256 |
| 1257 // Remove per-frame stored materialized objects when we are unwinding |
| 1258 // the frame. |
| 1259 void RemoveMaterializedObjectsOnUnwind(StackFrame* frame); |
| 1260 |
1257 // Traverse prototype chain to find out whether the object is derived from | 1261 // Traverse prototype chain to find out whether the object is derived from |
1258 // the Error object. | 1262 // the Error object. |
1259 bool IsErrorObject(Handle<Object> obj); | 1263 bool IsErrorObject(Handle<Object> obj); |
1260 | 1264 |
1261 base::Atomic32 id_; | 1265 base::Atomic32 id_; |
1262 EntryStackItem* entry_stack_; | 1266 EntryStackItem* entry_stack_; |
1263 int stack_trace_nesting_level_; | 1267 int stack_trace_nesting_level_; |
1264 StringStream* incomplete_message_; | 1268 StringStream* incomplete_message_; |
1265 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1269 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
1266 Bootstrapper* bootstrapper_; | 1270 Bootstrapper* bootstrapper_; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 } | 1603 } |
1600 | 1604 |
1601 EmbeddedVector<char, 128> filename_; | 1605 EmbeddedVector<char, 128> filename_; |
1602 FILE* file_; | 1606 FILE* file_; |
1603 int scope_depth_; | 1607 int scope_depth_; |
1604 }; | 1608 }; |
1605 | 1609 |
1606 } } // namespace v8::internal | 1610 } } // namespace v8::internal |
1607 | 1611 |
1608 #endif // V8_ISOLATE_H_ | 1612 #endif // V8_ISOLATE_H_ |
OLD | NEW |