Deprecate IdleNotification()

Embedders should use IdleNotificationDeadline()

BUG=none
R=hpayer@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1019793008

Cr-Commit-Position: refs/heads/master@{#27550}
This commit is contained in:
jochen 2015-03-31 10:11:10 -07:00 committed by Commit bot
parent 4e0209f8a5
commit 3fbc0cb79a

View File

@ -5418,8 +5418,9 @@ class V8_EXPORT Isolate {
*
* This should only be used for testing purposes and not to enforce a garbage
* collection schedule. It has strong negative impact on the garbage
* collection performance. Use IdleNotification() or LowMemoryNotification()
* instead to influence the garbage collection schedule.
* collection performance. Use IdleNotificationDeadline() or
* LowMemoryNotification() instead to influence the garbage collection
* schedule.
*/
void RequestGarbageCollectionForTesting(GarbageCollectionType type);
@ -5501,24 +5502,21 @@ class V8_EXPORT Isolate {
* Optional notification that the embedder is idle.
* V8 uses the notification to perform garbage collection.
* This call can be used repeatedly if the embedder remains idle.
* Returns true if the embedder should stop calling IdleNotification
* Returns true if the embedder should stop calling IdleNotificationDeadline
* until real work has been done. This indicates that V8 has done
* as much cleanup as it will be able to do.
*
* The idle_time_in_ms argument specifies the time V8 has to perform
* garbage collection. There is no guarantee that the actual work will be
* done within the time limit. This variant is deprecated and will be removed
* in the future.
*
* The deadline_in_seconds argument specifies the deadline V8 has to finish
* garbage collection work. deadline_in_seconds is compared with
* MonotonicallyIncreasingTime() and should be based on the same timebase as
* that function. There is no guarantee that the actual work will be done
* within the time limit.
*/
bool IdleNotification(int idle_time_in_ms);
bool IdleNotificationDeadline(double deadline_in_seconds);
V8_DEPRECATE_SOON("use IdleNotificationDeadline()",
bool IdleNotification(int idle_time_in_ms));
/**
* Optional notification that the system is running low on memory.
* V8 uses these notifications to attempt to free memory.