| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ASSERT(try_catch_handler_address_ == NULL); | 238 ASSERT(try_catch_handler_address_ == NULL); |
| 239 } | 239 } |
| 240 | 240 |
| 241 Isolate* isolate_; | 241 Isolate* isolate_; |
| 242 // The context where the current execution method is created and for variable | 242 // The context where the current execution method is created and for variable |
| 243 // lookups. | 243 // lookups. |
| 244 Context* context_; | 244 Context* context_; |
| 245 ThreadId thread_id_; | 245 ThreadId thread_id_; |
| 246 MaybeObject* pending_exception_; | 246 MaybeObject* pending_exception_; |
| 247 bool has_pending_message_; | 247 bool has_pending_message_; |
| 248 bool restoring_message_; |
| 248 Object* pending_message_obj_; | 249 Object* pending_message_obj_; |
| 249 Script* pending_message_script_; | 250 Script* pending_message_script_; |
| 250 int pending_message_start_pos_; | 251 int pending_message_start_pos_; |
| 251 int pending_message_end_pos_; | 252 int pending_message_end_pos_; |
| 252 // Use a separate value for scheduled exceptions to preserve the | 253 // Use a separate value for scheduled exceptions to preserve the |
| 253 // invariants that hold about pending_exception. We may want to | 254 // invariants that hold about pending_exception. We may want to |
| 254 // unify them later. | 255 // unify them later. |
| 255 MaybeObject* scheduled_exception_; | 256 MaybeObject* scheduled_exception_; |
| 256 bool external_caught_exception_; | 257 bool external_caught_exception_; |
| 257 SaveContext* save_context_; | 258 SaveContext* save_context_; |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 thread_local_top_.pending_exception_ = heap_.the_hole_value(); | 576 thread_local_top_.pending_exception_ = heap_.the_hole_value(); |
| 576 } | 577 } |
| 577 MaybeObject** pending_exception_address() { | 578 MaybeObject** pending_exception_address() { |
| 578 return &thread_local_top_.pending_exception_; | 579 return &thread_local_top_.pending_exception_; |
| 579 } | 580 } |
| 580 bool has_pending_exception() { | 581 bool has_pending_exception() { |
| 581 return !thread_local_top_.pending_exception_->IsTheHole(); | 582 return !thread_local_top_.pending_exception_->IsTheHole(); |
| 582 } | 583 } |
| 583 void clear_pending_message() { | 584 void clear_pending_message() { |
| 584 thread_local_top_.has_pending_message_ = false; | 585 thread_local_top_.has_pending_message_ = false; |
| 586 thread_local_top_.restoring_message_ = false; |
| 585 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); | 587 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); |
| 586 thread_local_top_.pending_message_script_ = NULL; | 588 thread_local_top_.pending_message_script_ = NULL; |
| 587 } | 589 } |
| 588 v8::TryCatch* try_catch_handler() { | 590 v8::TryCatch* try_catch_handler() { |
| 589 return thread_local_top_.TryCatchHandler(); | 591 return thread_local_top_.TryCatchHandler(); |
| 590 } | 592 } |
| 591 Address try_catch_handler_address() { | 593 Address try_catch_handler_address() { |
| 592 return thread_local_top_.try_catch_handler_address(); | 594 return thread_local_top_.try_catch_handler_address(); |
| 593 } | 595 } |
| 594 bool* external_caught_exception_address() { | 596 bool* external_caught_exception_address() { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); | 756 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); |
| 755 | 757 |
| 756 // Exception throwing support. The caller should use the result | 758 // Exception throwing support. The caller should use the result |
| 757 // of Throw() as its return value. | 759 // of Throw() as its return value. |
| 758 Failure* Throw(Object* exception, MessageLocation* location = NULL); | 760 Failure* Throw(Object* exception, MessageLocation* location = NULL); |
| 759 // Re-throw an exception. This involves no error reporting since | 761 // Re-throw an exception. This involves no error reporting since |
| 760 // error reporting was handled when the exception was thrown | 762 // error reporting was handled when the exception was thrown |
| 761 // originally. | 763 // originally. |
| 762 Failure* ReThrow(MaybeObject* exception); | 764 Failure* ReThrow(MaybeObject* exception); |
| 763 void ScheduleThrow(Object* exception); | 765 void ScheduleThrow(Object* exception); |
| 766 void RestoreMessage(Object* message, Script* script, int start, int end); |
| 767 // Re-set message, script, position saved in TryCatch to the TLS |
| 768 // so that ReThrow() does not overwrite them with a new message. |
| 764 void ReportPendingMessages(); | 769 void ReportPendingMessages(); |
| 765 // Return pending location if any or unfilled structure. | 770 // Return pending location if any or unfilled structure. |
| 766 MessageLocation GetMessageLocation(); | 771 MessageLocation GetMessageLocation(); |
| 767 Failure* ThrowIllegalOperation(); | 772 Failure* ThrowIllegalOperation(); |
| 768 | 773 |
| 769 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. | 774 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. |
| 770 Failure* PromoteScheduledException(); | 775 Failure* PromoteScheduledException(); |
| 771 void DoThrow(Object* exception, MessageLocation* location); | 776 void DoThrow(Object* exception, MessageLocation* location); |
| 772 // Checks if exception should be reported and finds out if it's | 777 // Checks if exception should be reported and finds out if it's |
| 773 // caught externally. | 778 // caught externally. |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 | 1503 |
| 1499 // Mark the native context with out of memory. | 1504 // Mark the native context with out of memory. |
| 1500 inline void Context::mark_out_of_memory() { | 1505 inline void Context::mark_out_of_memory() { |
| 1501 native_context()->set_out_of_memory(HEAP->true_value()); | 1506 native_context()->set_out_of_memory(HEAP->true_value()); |
| 1502 } | 1507 } |
| 1503 | 1508 |
| 1504 | 1509 |
| 1505 } } // namespace v8::internal | 1510 } } // namespace v8::internal |
| 1506 | 1511 |
| 1507 #endif // V8_ISOLATE_H_ | 1512 #endif // V8_ISOLATE_H_ |
| OLD | NEW |