Reviewers: Mads Ager,

Description:
Remove the high-priority flag from IdleNotification() since
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.


Please review this at http://codereview.chromium.org/257035

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

Affected files:
   M     include/v8.h
   M     src/api.cc
   M     src/v8.h
   M     src/v8.cc
   M     test/cctest/test-api.cc


Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc     (revision 3013)
+++ test/cctest/test-api.cc     (working copy)
@@ -7985,8 +7985,8 @@
  // 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());
  }


Index: include/v8.h
===================================================================
--- include/v8.h        (revision 3013)
+++ include/v8.h        (working copy)
@@ -2350,12 +2350,11 @@
     * 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: src/api.cc
===================================================================
--- src/api.cc  (revision 3014)
+++ src/api.cc  (working copy)
@@ -2602,11 +2602,11 @@
  }


-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: src/v8.h
===================================================================
--- src/v8.h    (revision 3013)
+++ src/v8.h    (working copy)
@@ -95,7 +95,7 @@
    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: src/v8.cc
===================================================================
--- src/v8.cc   (revision 3014)
+++ src/v8.cc   (working copy)
@@ -169,12 +169,10 @@
  }


-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();



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

Reply via email to