Revision: 9689
Author:   [email protected]
Date:     Wed Oct 19 00:49:47 2011
Log:      Fix from Paul Lind that helps post-isolates V8 work with older
Android releases.  See http://code.google.com/p/v8/issues/detail?id=1780
Review URL: http://codereview.chromium.org/8347032
http://code.google.com/p/v8/source/detail?r=9689

Modified:
 /branches/bleeding_edge/src/api.cc

=======================================
--- /branches/bleeding_edge/src/api.cc  Tue Oct 18 05:19:18 2011
+++ /branches/bleeding_edge/src/api.cc  Wed Oct 19 00:49:47 2011
@@ -4005,14 +4005,15 @@
 bool v8::V8::IdleNotification() {
   // Returning true tells the caller that it need not
   // continue to call IdleNotification.
-  if (!i::Isolate::Current()->IsInitialized()) return true;
+  i::Isolate* isolate = i::Isolate::Current();
+  if (isolate == NULL || !isolate->IsInitialized()) return true;
   return i::V8::IdleNotification();
 }


 void v8::V8::LowMemoryNotification() {
   i::Isolate* isolate = i::Isolate::Current();
-  if (!isolate->IsInitialized()) return;
+  if (isolate == NULL || !isolate->IsInitialized()) return;
   isolate->heap()->CollectAllAvailableGarbage();
 }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to