| Index: src/api.cc
|
| ===================================================================
|
| --- src/api.cc (revision 9686)
|
| +++ src/api.cc (working copy)
|
| @@ -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();
|
| }
|
|
|
|
|