Version 3.4.3

Clear the global thread table when an isolate is disposed (issue 1433).

Converted time zone name to UTF8 on Windows (issue 1290).

Limited the number of arguments in a function call to 32766 (issue 1413).

Compress sources of JS libraries in addition to the snapshot.

Fixed a bug in Lithium environment iteration.

Performance improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@8218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/isolate.cc b/src/isolate.cc
index 2003d9b..1d8a825 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1307,6 +1307,7 @@
   if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) {
     RuntimeProfiler::IsolateEnteredJS(this);
   }
+  ASSERT(context() == NULL || context()->IsContext());
 #endif
   return from + sizeof(ThreadLocalTop);
 }
@@ -1350,6 +1351,16 @@
 }
 
 
+void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) {
+  PerIsolateThreadData* data = list_;
+  while (data != NULL) {
+    PerIsolateThreadData* next = data->next_;
+    if (data->isolate() == isolate) Remove(data);
+    data = next;
+  }
+}
+
+
 #ifdef DEBUG
 #define TRACE_ISOLATE(tag)                                              \
   do {                                                                  \
@@ -1400,8 +1411,6 @@
       ast_sentinels_(NULL),
       string_tracker_(NULL),
       regexp_stack_(NULL),
-      frame_element_constant_list_(0),
-      result_constant_list_(0),
       embedder_data_(NULL) {
   TRACE_ISOLATE(constructor);
 
@@ -1466,6 +1475,10 @@
 
   Deinit();
 
+  { ScopedLock lock(process_wide_mutex_);
+    thread_data_table_->RemoveAllThreads(this);
+  }
+
   if (!IsDefaultIsolate()) {
     delete this;
   }