Commit 7f18bef0 authored by bak@chromium.org's avatar bak@chromium.org

Added idle notification to the API.

The implementation is still empty.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d7474a61
......@@ -2201,6 +2201,14 @@ class V8EXPORT V8 {
*/
static bool Dispose();
/**
* Optional notification that the embedder is idle.
* V8 uses the notification to reduce memory footprint.
* \param is_high_priority tells whether the embedder is high priority.
*/
static void IdleNotification(bool is_high_priority);
private:
V8();
......
......@@ -2558,6 +2558,10 @@ bool v8::V8::Dispose() {
}
void v8::V8::IdleNotification(bool is_high_priority) {
i::V8::IdleNotification(is_high_priority);
}
const char* v8::V8::GetVersion() {
static v8::internal::EmbeddedVector<char, 128> buffer;
v8::internal::Version::GetString(buffer);
......
......@@ -156,6 +156,10 @@ uint32_t V8::Random() {
return (hi << 16) + (lo & 0xFFFF);
}
void V8::IdleNotification(bool is_high_priority) {
// todo(bak): Reduce memory footprint.
}
Smi* V8::RandomPositiveSmi() {
uint32_t random = Random();
......
......@@ -99,6 +99,9 @@ class V8 : public AllStatic {
static uint32_t Random();
static Smi* RandomPositiveSmi();
// Idle notification directly from the API.
static void IdleNotification(bool is_high_priority);
private:
// True if engine is currently running
static bool is_running_;
......
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