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

Side by Side Diff: include/v8.h

Issue 750813003: Use deadline in IdleNotification. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | src/api.cc » ('j') | 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 5045 matching lines...) Expand 10 before | Expand all | Expand 10 after
5056 * Enables the host application to provide a mechanism for recording 5056 * Enables the host application to provide a mechanism for recording
5057 * histograms. The CreateHistogram function returns a 5057 * histograms. The CreateHistogram function returns a
5058 * histogram which will later be passed to the AddHistogramSample 5058 * histogram which will later be passed to the AddHistogramSample
5059 * function. 5059 * function.
5060 */ 5060 */
5061 void SetCreateHistogramFunction(CreateHistogramCallback); 5061 void SetCreateHistogramFunction(CreateHistogramCallback);
5062 void SetAddHistogramSampleFunction(AddHistogramSampleCallback); 5062 void SetAddHistogramSampleFunction(AddHistogramSampleCallback);
5063 5063
5064 /** 5064 /**
5065 * Optional notification that the embedder is idle. 5065 * Optional notification that the embedder is idle.
5066 * V8 uses the notification to reduce memory footprint. 5066 * V8 uses the notification to perform garbage collection.
5067 * This call can be used repeatedly if the embedder remains idle. 5067 * This call can be used repeatedly if the embedder remains idle.
5068 * Returns true if the embedder should stop calling IdleNotification 5068 * Returns true if the embedder should stop calling IdleNotification
5069 * until real work has been done. This indicates that V8 has done 5069 * until real work has been done. This indicates that V8 has done
5070 * as much cleanup as it will be able to do. 5070 * as much cleanup as it will be able to do.
5071 * 5071 *
5072 * The idle_time_in_ms argument specifies the time V8 has to do reduce 5072 * The idle_time_in_ms argument specifies the time V8 has to perform
5073 * the memory footprint. There is no guarantee that the actual work will be 5073 * garbage collection. There is no guarantee that the actual work will be
5074 * done within the time limit. 5074 * done within the time limit.
5075 * The deadline_in_seconds argument specifies the deadline V8 has to finish
5076 * garbage collection work. deadline_in_seconds is compared with
5077 * MonotonicallyIncreasingTime() and should be based on the same timebase as
5078 * that function. There is no guarantee that the actual work will be done
5079 * within the time limit.
5075 */ 5080 */
5076 bool IdleNotification(int idle_time_in_ms); 5081 bool IdleNotification(int idle_time_in_ms);
5082 bool IdleNotificationDeadline(double deadline_in_seconds);
5077 5083
5078 /** 5084 /**
5079 * Optional notification that the system is running low on memory. 5085 * Optional notification that the system is running low on memory.
5080 * V8 uses these notifications to attempt to free memory. 5086 * V8 uses these notifications to attempt to free memory.
5081 */ 5087 */
5082 void LowMemoryNotification(); 5088 void LowMemoryNotification();
5083 5089
5084 /** 5090 /**
5085 * Optional notification that a context has been disposed. V8 uses 5091 * Optional notification that a context has been disposed. V8 uses
5086 * these notifications to guide the GC heuristic. Returns the number 5092 * these notifications to guide the GC heuristic. Returns the number
(...skipping 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after
7453 */ 7459 */
7454 7460
7455 7461
7456 } // namespace v8 7462 } // namespace v8
7457 7463
7458 7464
7459 #undef TYPE_CHECK 7465 #undef TYPE_CHECK
7460 7466
7461 7467
7462 #endif // V8_H_ 7468 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698