Commit 5191c81d authored by mike@belshe.com's avatar mike@belshe.com

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.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 35cf7a24
...@@ -2349,12 +2349,11 @@ class V8EXPORT V8 { ...@@ -2349,12 +2349,11 @@ class V8EXPORT V8 {
* Optional notification that the embedder is idle. * Optional notification that the embedder is idle.
* V8 uses the notification to reduce memory footprint. * V8 uses the notification to reduce memory footprint.
* This call can be used repeatedly if the embedder remains idle. * 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 * Returns true if the embedder should stop calling IdleNotification
* until real work has been done. This indicates that V8 has done * until real work has been done. This indicates that V8 has done
* as much cleanup as it will be able to do. * 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. * Optional notification that the system is running low on memory.
......
...@@ -2602,11 +2602,11 @@ bool v8::V8::Dispose() { ...@@ -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 // Returning true tells the caller that it need not
// continue to call IdleNotification. // continue to call IdleNotification.
if (!i::V8::IsRunning()) return true; if (!i::V8::IsRunning()) return true;
return i::V8::IdleNotification(is_high_priority); return i::V8::IdleNotification();
} }
......
...@@ -169,12 +169,10 @@ uint32_t V8::Random() { ...@@ -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 // Returning true tells the caller that there is no need to call
// IdleNotification again. // IdleNotification again.
if (!FLAG_use_idle_notification) return true; 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. // Tell the heap that it may want to adjust.
return Heap::IdleNotification(); return Heap::IdleNotification();
......
...@@ -95,7 +95,7 @@ class V8 : public AllStatic { ...@@ -95,7 +95,7 @@ class V8 : public AllStatic {
static Smi* RandomPositiveSmi(); static Smi* RandomPositiveSmi();
// Idle notification directly from the API. // Idle notification directly from the API.
static bool IdleNotification(bool is_high_priority); static bool IdleNotification();
private: private:
// True if engine is currently running // True if engine is currently running
......
...@@ -7916,8 +7916,8 @@ THREADED_TEST(StackTrace) { ...@@ -7916,8 +7916,8 @@ THREADED_TEST(StackTrace) {
// Test that idle notification can be handled when V8 has not yet been // Test that idle notification can be handled when V8 has not yet been
// set up. // set up.
THREADED_TEST(IdleNotification) { THREADED_TEST(IdleNotification) {
for (int i = 0; i < 100; i++) v8::V8::IdleNotification(true); for (int i = 0; i < 100; i++)
for (int i = 0; i < 100; i++) v8::V8::IdleNotification(false); CHECK(v8::V8::IdleNotification());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment