diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-10-13 17:45:02 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-10-13 17:45:02 -0700 |
commit | 33b5f2f7799081eafe04df3278aad40fd4ae3b55 (patch) | |
tree | 46e2840438240411375d3f12f5172c42aa571f95 /deps/v8/src/isolate.cc | |
parent | 59a5262041dce0760b1f960a900eca8b8ca1138f (diff) | |
download | node-33b5f2f7799081eafe04df3278aad40fd4ae3b55.tar.gz |
Upgrade V8 to 3.7.0
Diffstat (limited to 'deps/v8/src/isolate.cc')
-rw-r--r-- | deps/v8/src/isolate.cc | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/deps/v8/src/isolate.cc b/deps/v8/src/isolate.cc index fd0f673e7..492694e60 100644 --- a/deps/v8/src/isolate.cc +++ b/deps/v8/src/isolate.cc @@ -98,6 +98,14 @@ void ThreadLocalTop::InitializeInternal() { failed_access_check_callback_ = NULL; save_context_ = NULL; catcher_ = NULL; + + // These members are re-initialized later after deserialization + // is complete. + pending_exception_ = NULL; + has_pending_message_ = false; + pending_message_obj_ = NULL; + pending_message_script_ = NULL; + scheduled_exception_ = NULL; } @@ -1284,6 +1292,9 @@ char* Isolate::ArchiveThread(char* to) { memcpy(to, reinterpret_cast<char*>(thread_local_top()), sizeof(ThreadLocalTop)); InitializeThreadLocal(); + clear_pending_exception(); + clear_pending_message(); + clear_scheduled_exception(); return to + sizeof(ThreadLocalTop); } @@ -1403,11 +1414,12 @@ Isolate::Isolate() in_use_list_(0), free_list_(0), preallocated_storage_preallocated_(false), - pc_to_code_cache_(NULL), + inner_pointer_to_code_cache_(NULL), write_input_buffer_(NULL), global_handles_(NULL), context_switcher_(NULL), thread_manager_(NULL), + fp_stubs_generated_(false), string_tracker_(NULL), regexp_stack_(NULL), embedder_data_(NULL) { @@ -1575,8 +1587,8 @@ Isolate::~Isolate() { compilation_cache_ = NULL; delete bootstrapper_; bootstrapper_ = NULL; - delete pc_to_code_cache_; - pc_to_code_cache_ = NULL; + delete inner_pointer_to_code_cache_; + inner_pointer_to_code_cache_ = NULL; delete write_input_buffer_; write_input_buffer_ = NULL; @@ -1610,9 +1622,6 @@ Isolate::~Isolate() { void Isolate::InitializeThreadLocal() { thread_local_top_.isolate_ = this; thread_local_top_.Initialize(); - clear_pending_exception(); - clear_pending_message(); - clear_scheduled_exception(); } @@ -1700,7 +1709,7 @@ bool Isolate::Init(Deserializer* des) { context_slot_cache_ = new ContextSlotCache(); descriptor_lookup_cache_ = new DescriptorLookupCache(); unicode_cache_ = new UnicodeCache(); - pc_to_code_cache_ = new PcToCodeCache(this); + inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); write_input_buffer_ = new StringInputBuffer(); global_handles_ = new GlobalHandles(this); bootstrapper_ = new Bootstrapper(); @@ -1767,9 +1776,14 @@ bool Isolate::Init(Deserializer* des) { // If we are deserializing, read the state into the now-empty heap. if (des != NULL) { des->Deserialize(); - stub_cache_->Clear(); + stub_cache_->Initialize(true); } + // Finish initialization of ThreadLocal after deserialization is done. + clear_pending_exception(); + clear_pending_message(); + clear_scheduled_exception(); + // Deserializing may put strange things in the root array's copy of the // stack guard. heap_.SetStackLimits(); |