Revision: 21531
Author:   yang...@chromium.org
Date:     Tue May 27 14:21:46 2014 UTC
Log:      Revert "Add a flag to d8 to invoke weak callbacks"

This reverts r21529.

TBR=joc...@chromium.org

Review URL: https://codereview.chromium.org/302543004
http://code.google.com/p/v8/source/detail?r=21531

Modified:
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/d8.h
 /branches/bleeding_edge/tools/run-tests.py

=======================================
--- /branches/bleeding_edge/src/d8.cc   Tue May 27 13:57:48 2014 UTC
+++ /branches/bleeding_edge/src/d8.cc   Tue May 27 14:21:46 2014 UTC
@@ -1188,21 +1188,6 @@
// OS-specific padding for thread startup code. 2Mbytes seems to be enough.
   return i::Thread::Options("IsolateThread", 2 * MB);
 }
-
-
-void SuggestivelyAskForAggressiveGC() {
-  if (Shell::options.send_idle_notification) {
-    const int kLongIdlePauseInMs = 1000;
-    V8::ContextDisposedNotification();
-    V8::IdleNotification(kLongIdlePauseInMs);
-  }
-  if (Shell::options.invoke_weak_callbacks) {
-    // By sending a low memory notifications, we will try hard to collect
-    // all garbage and will therefore also invoke all weak callbacks of
-    // actually unreachable persistent handles.
-    V8::LowMemoryNotification();
-  }
-}


 void SourceGroup::ExecuteInThread() {
@@ -1221,11 +1206,14 @@
           Execute(isolate);
         }
       }
-      SuggestivelyAskForAggressiveGC();
+      if (Shell::options.send_idle_notification) {
+        const int kLongIdlePauseInMs = 1000;
+        V8::ContextDisposedNotification();
+        V8::IdleNotification(kLongIdlePauseInMs);
+      }
     }
     done_semaphore_.Signal();
   } while (!Shell::options.last_run);
-
   isolate->Dispose();
 }

@@ -1286,11 +1274,6 @@
     } else if (strcmp(argv[i], "--send-idle-notification") == 0) {
       options.send_idle_notification = true;
       argv[i] = NULL;
-    } else if (strcmp(argv[i], "--invoke-weak-callbacks") == 0) {
-      options.invoke_weak_callbacks = true;
-      // TODO(jochen) See issue 3351
-      options.send_idle_notification = true;
-      argv[i] = NULL;
     } else if (strcmp(argv[i], "-f") == 0) {
       // Ignore any -f flags for compatibility with other stand-alone
       // JavaScript engines.
@@ -1379,7 +1362,11 @@
       options.isolate_sources[0].Execute(isolate);
     }
   }
-  SuggestivelyAskForAggressiveGC();
+  if (options.send_idle_notification) {
+    const int kLongIdlePauseInMs = 1000;
+    V8::ContextDisposedNotification();
+    V8::IdleNotification(kLongIdlePauseInMs);
+  }

 #ifndef V8_SHARED
   for (int i = 1; i < options.num_isolates; ++i) {
=======================================
--- /branches/bleeding_edge/src/d8.h    Tue May 27 13:57:48 2014 UTC
+++ /branches/bleeding_edge/src/d8.h    Tue May 27 14:21:46 2014 UTC
@@ -198,7 +198,6 @@
      script_executed(false),
      last_run(true),
      send_idle_notification(false),
-     invoke_weak_callbacks(false),
      stress_opt(false),
      stress_deopt(false),
      interactive_shell(false),
@@ -221,7 +220,6 @@
   bool script_executed;
   bool last_run;
   bool send_idle_notification;
-  bool invoke_weak_callbacks;
   bool stress_opt;
   bool stress_deopt;
   bool interactive_shell;
=======================================
--- /branches/bleeding_edge/tools/run-tests.py  Tue May 27 13:57:48 2014 UTC
+++ /branches/bleeding_edge/tools/run-tests.py  Tue May 27 14:21:46 2014 UTC
@@ -257,7 +257,7 @@
     options.extra_flags += GC_STRESS_FLAGS

   if options.asan:
-    options.extra_flags.append("--invoke-weak-callbacks")
+    options.extra_flags.append("--send-idle-notification")

   if options.j == 0:
     options.j = multiprocessing.cpu_count()

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to