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
* 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.
}
-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();
}
}
-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();
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
// 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());
}