| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 ASSERT(!external_caught_exception_); | 228 ASSERT(!external_caught_exception_); |
| 229 ASSERT(try_catch_handler_address_ == NULL); | 229 ASSERT(try_catch_handler_address_ == NULL); |
| 230 } | 230 } |
| 231 | 231 |
| 232 Isolate* isolate_; | 232 Isolate* isolate_; |
| 233 // The context where the current execution method is created and for variable | 233 // The context where the current execution method is created and for variable |
| 234 // lookups. | 234 // lookups. |
| 235 Context* context_; | 235 Context* context_; |
| 236 ThreadId thread_id_; | 236 ThreadId thread_id_; |
| 237 MaybeObject* pending_exception_; | 237 MaybeObject* pending_exception_; |
| 238 Object* last_traced_exception_; |
| 239 JSArray* last_stack_trace_; |
| 238 bool has_pending_message_; | 240 bool has_pending_message_; |
| 239 Object* pending_message_obj_; | 241 Object* pending_message_obj_; |
| 240 Script* pending_message_script_; | 242 Script* pending_message_script_; |
| 241 int pending_message_start_pos_; | 243 int pending_message_start_pos_; |
| 242 int pending_message_end_pos_; | 244 int pending_message_end_pos_; |
| 243 // Use a separate value for scheduled exceptions to preserve the | 245 // Use a separate value for scheduled exceptions to preserve the |
| 244 // invariants that hold about pending_exception. We may want to | 246 // invariants that hold about pending_exception. We may want to |
| 245 // unify them later. | 247 // unify them later. |
| 246 MaybeObject* scheduled_exception_; | 248 MaybeObject* scheduled_exception_; |
| 247 bool external_caught_exception_; | 249 bool external_caught_exception_; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 } | 559 } |
| 558 void set_external_caught_exception(bool value) { | 560 void set_external_caught_exception(bool value) { |
| 559 thread_local_top_.external_caught_exception_ = value; | 561 thread_local_top_.external_caught_exception_ = value; |
| 560 } | 562 } |
| 561 void set_pending_exception(MaybeObject* exception) { | 563 void set_pending_exception(MaybeObject* exception) { |
| 562 thread_local_top_.pending_exception_ = exception; | 564 thread_local_top_.pending_exception_ = exception; |
| 563 } | 565 } |
| 564 void clear_pending_exception() { | 566 void clear_pending_exception() { |
| 565 thread_local_top_.pending_exception_ = heap_.the_hole_value(); | 567 thread_local_top_.pending_exception_ = heap_.the_hole_value(); |
| 566 } | 568 } |
| 569 void clear_last_stack_trace() { |
| 570 thread_local_top_.last_traced_exception_ = heap_.the_hole_value(); |
| 571 thread_local_top_.last_stack_trace_ = NULL; |
| 572 } |
| 567 MaybeObject** pending_exception_address() { | 573 MaybeObject** pending_exception_address() { |
| 568 return &thread_local_top_.pending_exception_; | 574 return &thread_local_top_.pending_exception_; |
| 569 } | 575 } |
| 570 bool has_pending_exception() { | 576 bool has_pending_exception() { |
| 571 return !thread_local_top_.pending_exception_->IsTheHole(); | 577 return !thread_local_top_.pending_exception_->IsTheHole(); |
| 572 } | 578 } |
| 573 void clear_pending_message() { | 579 void clear_pending_message() { |
| 574 thread_local_top_.has_pending_message_ = false; | 580 thread_local_top_.has_pending_message_ = false; |
| 575 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); | 581 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); |
| 576 thread_local_top_.pending_message_script_ = NULL; | 582 thread_local_top_.pending_message_script_ = NULL; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 void set_ignore_out_of_memory(bool value) { | 699 void set_ignore_out_of_memory(bool value) { |
| 694 thread_local_top_.ignore_out_of_memory_ = value; | 700 thread_local_top_.ignore_out_of_memory_ = value; |
| 695 } | 701 } |
| 696 | 702 |
| 697 void PrintCurrentStackTrace(FILE* out); | 703 void PrintCurrentStackTrace(FILE* out); |
| 698 void PrintStackTrace(FILE* out, char* thread_data); | 704 void PrintStackTrace(FILE* out, char* thread_data); |
| 699 void PrintStack(StringStream* accumulator); | 705 void PrintStack(StringStream* accumulator); |
| 700 void PrintStack(); | 706 void PrintStack(); |
| 701 Handle<String> StackTraceString(); | 707 Handle<String> StackTraceString(); |
| 702 Handle<JSArray> CaptureCurrentStackTrace( | 708 Handle<JSArray> CaptureCurrentStackTrace( |
| 703 int frame_limit, | 709 int frame_limit, StackTrace::StackTraceOptions options); |
| 704 StackTrace::StackTraceOptions options); | |
| 705 | 710 |
| 706 // Returns if the top context may access the given global object. If | 711 // Returns if the top context may access the given global object. If |
| 707 // the result is false, the pending exception is guaranteed to be | 712 // the result is false, the pending exception is guaranteed to be |
| 708 // set. | 713 // set. |
| 709 bool MayNamedAccess(JSObject* receiver, | 714 bool MayNamedAccess(JSObject* receiver, |
| 710 Object* key, | 715 Object* key, |
| 711 v8::AccessType type); | 716 v8::AccessType type); |
| 712 bool MayIndexedAccess(JSObject* receiver, | 717 bool MayIndexedAccess(JSObject* receiver, |
| 713 uint32_t index, | 718 uint32_t index, |
| 714 v8::AccessType type); | 719 v8::AccessType type); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 | 1396 |
| 1392 // Mark the global context with out of memory. | 1397 // Mark the global context with out of memory. |
| 1393 inline void Context::mark_out_of_memory() { | 1398 inline void Context::mark_out_of_memory() { |
| 1394 global_context()->set_out_of_memory(HEAP->true_value()); | 1399 global_context()->set_out_of_memory(HEAP->true_value()); |
| 1395 } | 1400 } |
| 1396 | 1401 |
| 1397 | 1402 |
| 1398 } } // namespace v8::internal | 1403 } } // namespace v8::internal |
| 1399 | 1404 |
| 1400 #endif // V8_ISOLATE_H_ | 1405 #endif // V8_ISOLATE_H_ |
| OLD | NEW |