Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: include/v8.h

Issue 1019793008: Deprecate IdleNotification() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5411 * Registered |callback| must not reenter interrupted Isolate. 5411 * Registered |callback| must not reenter interrupted Isolate.
5412 */ 5412 */
5413 void RequestInterrupt(InterruptCallback callback, void* data); 5413 void RequestInterrupt(InterruptCallback callback, void* data);
5414 5414
5415 /** 5415 /**
5416 * Request garbage collection in this Isolate. It is only valid to call this 5416 * Request garbage collection in this Isolate. It is only valid to call this
5417 * function if --expose_gc was specified. 5417 * function if --expose_gc was specified.
5418 * 5418 *
5419 * This should only be used for testing purposes and not to enforce a garbage 5419 * This should only be used for testing purposes and not to enforce a garbage
5420 * collection schedule. It has strong negative impact on the garbage 5420 * collection schedule. It has strong negative impact on the garbage
5421 * collection performance. Use IdleNotification() or LowMemoryNotification() 5421 * collection performance. Use IdleNotificationDeadline() or
5422 * instead to influence the garbage collection schedule. 5422 * LowMemoryNotification() instead to influence the garbage collection
5423 * schedule.
5423 */ 5424 */
5424 void RequestGarbageCollectionForTesting(GarbageCollectionType type); 5425 void RequestGarbageCollectionForTesting(GarbageCollectionType type);
5425 5426
5426 /** 5427 /**
5427 * Set the callback to invoke for logging event. 5428 * Set the callback to invoke for logging event.
5428 */ 5429 */
5429 void SetEventLogger(LogEventCallback that); 5430 void SetEventLogger(LogEventCallback that);
5430 5431
5431 /** 5432 /**
5432 * Adds a callback to notify the host application when a script finished 5433 * Adds a callback to notify the host application when a script finished
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
5494 * histogram which will later be passed to the AddHistogramSample 5495 * histogram which will later be passed to the AddHistogramSample
5495 * function. 5496 * function.
5496 */ 5497 */
5497 void SetCreateHistogramFunction(CreateHistogramCallback); 5498 void SetCreateHistogramFunction(CreateHistogramCallback);
5498 void SetAddHistogramSampleFunction(AddHistogramSampleCallback); 5499 void SetAddHistogramSampleFunction(AddHistogramSampleCallback);
5499 5500
5500 /** 5501 /**
5501 * Optional notification that the embedder is idle. 5502 * Optional notification that the embedder is idle.
5502 * V8 uses the notification to perform garbage collection. 5503 * V8 uses the notification to perform garbage collection.
5503 * This call can be used repeatedly if the embedder remains idle. 5504 * This call can be used repeatedly if the embedder remains idle.
5504 * Returns true if the embedder should stop calling IdleNotification 5505 * Returns true if the embedder should stop calling IdleNotificationDeadline
5505 * until real work has been done. This indicates that V8 has done 5506 * until real work has been done. This indicates that V8 has done
5506 * as much cleanup as it will be able to do. 5507 * as much cleanup as it will be able to do.
5507 * 5508 *
5508 * The idle_time_in_ms argument specifies the time V8 has to perform
5509 * garbage collection. There is no guarantee that the actual work will be
5510 * done within the time limit. This variant is deprecated and will be removed
5511 * in the future.
5512 *
5513 * The deadline_in_seconds argument specifies the deadline V8 has to finish 5509 * The deadline_in_seconds argument specifies the deadline V8 has to finish
5514 * garbage collection work. deadline_in_seconds is compared with 5510 * garbage collection work. deadline_in_seconds is compared with
5515 * MonotonicallyIncreasingTime() and should be based on the same timebase as 5511 * MonotonicallyIncreasingTime() and should be based on the same timebase as
5516 * that function. There is no guarantee that the actual work will be done 5512 * that function. There is no guarantee that the actual work will be done
5517 * within the time limit. 5513 * within the time limit.
5518 */ 5514 */
5519 bool IdleNotification(int idle_time_in_ms);
5520 bool IdleNotificationDeadline(double deadline_in_seconds); 5515 bool IdleNotificationDeadline(double deadline_in_seconds);
5521 5516
5517 V8_DEPRECATE_SOON("use IdleNotificationDeadline()",
5518 bool IdleNotification(int idle_time_in_ms));
5519
5522 /** 5520 /**
5523 * Optional notification that the system is running low on memory. 5521 * Optional notification that the system is running low on memory.
5524 * V8 uses these notifications to attempt to free memory. 5522 * V8 uses these notifications to attempt to free memory.
5525 */ 5523 */
5526 void LowMemoryNotification(); 5524 void LowMemoryNotification();
5527 5525
5528 /** 5526 /**
5529 * Optional notification that a context has been disposed. V8 uses 5527 * Optional notification that a context has been disposed. V8 uses
5530 * these notifications to guide the GC heuristic. Returns the number 5528 * these notifications to guide the GC heuristic. Returns the number
5531 * of context disposals - including this one - since the last time 5529 * of context disposals - including this one - since the last time
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
8060 */ 8058 */
8061 8059
8062 8060
8063 } // namespace v8 8061 } // namespace v8
8064 8062
8065 8063
8066 #undef TYPE_CHECK 8064 #undef TYPE_CHECK
8067 8065
8068 8066
8069 #endif // V8_H_ 8067 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698