Reviewers: Erik Corry,

Description:
Rename ThreadManager::IterateThreads to ThreadManager::IterateArchivedThreads

The IterateThreads method only iterates archived threads. If all
threads are to be iterated an additional iteration of the current active
stack is also needed.



Please review this at http://codereview.chromium.org/2655002/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/heap.cc
  M     src/liveedit.cc
  M     src/v8threads.h
  M     src/v8threads.cc


Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 4792)
+++ src/heap.cc (working copy)
@@ -560,7 +560,7 @@
 void Heap::ClearJSFunctionResultCaches() {
   if (Bootstrapper::IsActive()) return;
   ClearThreadJSFunctionResultCachesVisitor visitor;
-  ThreadManager::IterateThreads(&visitor);
+  ThreadManager::IterateArchivedThreads(&visitor);
 }


Index: src/liveedit.cc
===================================================================
--- src/liveedit.cc     (revision 4792)
+++ src/liveedit.cc     (working copy)
@@ -794,7 +794,7 @@

 static void IterateAllThreads(ThreadVisitor* visitor) {
   Top::IterateThread(visitor);
-  ThreadManager::IterateThreads(visitor);
+  ThreadManager::IterateArchivedThreads(visitor);
 }

 // Finds all references to original and replaces them with substitution.
@@ -1386,7 +1386,7 @@
// First check inactive threads. Fail if some functions are blocked there. InactiveThreadActivationsChecker inactive_threads_checker(shared_info_array,
                                                             result);
-  ThreadManager::IterateThreads(&inactive_threads_checker);
+  ThreadManager::IterateArchivedThreads(&inactive_threads_checker);
   if (inactive_threads_checker.HasBlockedFunctions()) {
     return result;
   }
Index: src/v8threads.cc
===================================================================
--- src/v8threads.cc    (revision 4792)
+++ src/v8threads.cc    (working copy)
@@ -331,7 +331,7 @@
 }


-void ThreadManager::IterateThreads(ThreadVisitor* v) {
+void ThreadManager::IterateArchivedThreads(ThreadVisitor* v) {
   for (ThreadState* state = ThreadState::FirstInUse();
        state != NULL;
        state = state->Next()) {
Index: src/v8threads.h
===================================================================
--- src/v8threads.h     (revision 4792)
+++ src/v8threads.h     (working copy)
@@ -104,7 +104,7 @@
   static bool IsArchived();

   static void Iterate(ObjectVisitor* v);
-  static void IterateThreads(ThreadVisitor* v);
+  static void IterateArchivedThreads(ThreadVisitor* v);
   static void MarkCompactPrologue(bool is_compacting);
   static void MarkCompactEpilogue(bool is_compacting);
   static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to