Remove the high-priority flag from IdleNotification() since
authormike@belshe.com <mike@belshe.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Oct 2009 00:06:17 +0000 (00:06 +0000)
committermike@belshe.com <mike@belshe.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Oct 2009 00:06:17 +0000 (00:06 +0000)
it is a strange API and unused anyway.

When we roll this to Chrome, we'll need a small chrome patch
to fix Chrome's usage of the API.

Review URL: http://codereview.chromium.org/257035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

include/v8.h
src/api.cc
src/v8.cc
src/v8.h
test/cctest/test-api.cc

index 4992d75..adb9f43 100644 (file)
@@ -2349,12 +2349,11 @@ class V8EXPORT V8 {
    * Optional notification that the embedder is idle.
    * V8 uses the notification to reduce memory footprint.
    * This call can be used repeatedly if the embedder remains idle.
-   * \param is_high_priority tells whether the embedder is high priority.
    * Returns true if the embedder should stop calling IdleNotification
    * until real work has been done.  This indicates that V8 has done
    * as much cleanup as it will be able to do.
    */
-  static bool IdleNotification(bool is_high_priority);
+  static bool IdleNotification();
 
   /**
    * Optional notification that the system is running low on memory.
index fd3d921..00f1e0b 100644 (file)
@@ -2602,11 +2602,11 @@ bool v8::V8::Dispose() {
 }
 
 
-bool v8::V8::IdleNotification(bool is_high_priority) {
+bool v8::V8::IdleNotification() {
   // Returning true tells the caller that it need not
   // continue to call IdleNotification.
   if (!i::V8::IsRunning()) return true;
-  return i::V8::IdleNotification(is_high_priority);
+  return i::V8::IdleNotification();
 }
 
 
index f0115ec..3f8e6cd 100644 (file)
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -169,12 +169,10 @@ uint32_t V8::Random() {
 }
 
 
-bool V8::IdleNotification(bool is_high_priority) {
+bool V8::IdleNotification() {
   // Returning true tells the caller that there is no need to call
   // IdleNotification again.
   if (!FLAG_use_idle_notification) return true;
-  // Ignore high priority instances of V8.
-  if (is_high_priority) return true;
 
   // Tell the heap that it may want to adjust.
   return Heap::IdleNotification();
index 7786d66..106ae61 100644 (file)
--- a/src/v8.h
+++ b/src/v8.h
@@ -95,7 +95,7 @@ class V8 : public AllStatic {
   static Smi* RandomPositiveSmi();
 
   // Idle notification directly from the API.
-  static bool IdleNotification(bool is_high_priority);
+  static bool IdleNotification();
 
  private:
   // True if engine is currently running
index f430cbd..db89e18 100644 (file)
@@ -7916,8 +7916,8 @@ THREADED_TEST(StackTrace) {
 // Test that idle notification can be handled when V8 has not yet been
 // set up.
 THREADED_TEST(IdleNotification) {
-  for (int i = 0; i < 100; i++) v8::V8::IdleNotification(true);
-  for (int i = 0; i < 100; i++) v8::V8::IdleNotification(false);
+  for (int i = 0; i < 100; i++)
+    CHECK(v8::V8::IdleNotification());
 }