Remove obsolete V8::IdleNotification dispatch.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 Sep 2013 13:37:39 +0000 (13:37 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 Sep 2013 13:37:39 +0000 (13:37 +0000)
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/api.cc
src/v8.cc
src/v8.h

index 5901e45..c95def1 100644 (file)
@@ -5316,7 +5316,8 @@ bool v8::V8::IdleNotification(int hint) {
   // continue to call IdleNotification.
   i::Isolate* isolate = i::Isolate::Current();
   if (isolate == NULL || !isolate->IsInitialized()) return true;
-  return i::V8::IdleNotification(hint);
+  if (!i::FLAG_use_idle_notification) return true;
+  return isolate->heap()->IdleNotification(hint);
 }
 
 
index f2aa837..e47ff12 100644 (file)
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -174,16 +174,6 @@ uint32_t V8::RandomPrivate(Isolate* isolate) {
 }
 
 
-bool V8::IdleNotification(int hint) {
-  // Returning true tells the caller that there is no need to call
-  // IdleNotification again.
-  if (!FLAG_use_idle_notification) return true;
-
-  // Tell the heap that it may want to adjust.
-  return HEAP->IdleNotification(hint);
-}
-
-
 void V8::AddCallCompletedCallback(CallCompletedCallback callback) {
   if (call_completed_callbacks_ == NULL) {  // Lazy init.
     call_completed_callbacks_ = new List<CallCompletedCallback>();
index 707482f..69f4df9 100644 (file)
--- a/src/v8.h
+++ b/src/v8.h
@@ -105,9 +105,6 @@ class V8 : public AllStatic {
   static Object* FillHeapNumberWithRandom(Object* heap_number,
                                           Context* context);
 
-  // Idle notification directly from the API.
-  static bool IdleNotification(int hint);
-
   static void AddCallCompletedCallback(CallCompletedCallback callback);
   static void RemoveCallCompletedCallback(CallCompletedCallback callback);
   static void FireCallCompletedCallback(Isolate* isolate);