Revision: 2674
Author: [email protected]
Date: Thu Aug 13 02:35:51 2009
Log: Added idle notification to the API.
The implementation is still empty.

Review URL: http://codereview.chromium.org/165445
http://code.google.com/p/v8/source/detail?r=2674

Modified:
  /branches/bleeding_edge/include/v8.h
  /branches/bleeding_edge/src/api.cc
  /branches/bleeding_edge/src/v8.cc
  /branches/bleeding_edge/src/v8.h

=======================================
--- /branches/bleeding_edge/include/v8.h        Wed Aug 12 03:27:35 2009
+++ /branches/bleeding_edge/include/v8.h        Thu Aug 13 02:35:51 2009
@@ -2201,6 +2201,14 @@
     */
    static bool Dispose();

+
+  /**
+   * Optional notification that the embedder is idle.
+   * V8 uses the notification to reduce memory footprint.
+   * \param is_high_priority tells whether the embedder is high priority.
+   */
+  static void IdleNotification(bool is_high_priority);
+
   private:
    V8();

=======================================
--- /branches/bleeding_edge/src/api.cc  Wed Aug 12 14:30:13 2009
+++ /branches/bleeding_edge/src/api.cc  Thu Aug 13 02:35:51 2009
@@ -2558,6 +2558,10 @@
  }


+void  v8::V8::IdleNotification(bool is_high_priority) {
+  i::V8::IdleNotification(is_high_priority);
+}
+
  const char* v8::V8::GetVersion() {
    static v8::internal::EmbeddedVector<char, 128> buffer;
    v8::internal::Version::GetString(buffer);
=======================================
--- /branches/bleeding_edge/src/v8.cc   Mon Jun 15 01:04:47 2009
+++ /branches/bleeding_edge/src/v8.cc   Thu Aug 13 02:35:51 2009
@@ -155,6 +155,10 @@
    lo = 18273 * (lo & 0xFFFF) + (lo >> 16);
    return (hi << 16) + (lo & 0xFFFF);
  }
+
+void V8::IdleNotification(bool is_high_priority) {
+  // todo(bak): Reduce memory footprint.
+}


  Smi* V8::RandomPositiveSmi() {
=======================================
--- /branches/bleeding_edge/src/v8.h    Wed Jun 24 06:09:34 2009
+++ /branches/bleeding_edge/src/v8.h    Thu Aug 13 02:35:51 2009
@@ -99,6 +99,9 @@
    static uint32_t Random();
    static Smi* RandomPositiveSmi();

+  // Idle notification directly from the API.
+  static void IdleNotification(bool is_high_priority);
+
   private:
    // True if engine is currently running
    static bool is_running_;

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

Reply via email to