Revision: 3014 Author: [email protected] Date: Fri Oct 2 10:26:50 2009 Log: The error cases were returning false instead of true. So if the caller does something like: while(!IdleNotification()) it could spin forever if v8 were not initialized.
I'd like to further remove the is_high_priority flag, because it is not in use. Mads - is there any reason not to remove it? http://code.google.com/p/v8/source/detail?r=3014 Modified: /branches/bleeding_edge/src/api.cc /branches/bleeding_edge/src/v8.cc ======================================= --- /branches/bleeding_edge/src/api.cc Fri Oct 2 06:35:37 2009 +++ /branches/bleeding_edge/src/api.cc Fri Oct 2 10:26:50 2009 @@ -107,9 +107,6 @@ static void DefaultFatalErrorHandler(const char* location, const char* message) { -#ifdef DEBUG - i::PrintF("Fatal Error: %s: %s\n", location, message); -#endif ENTER_V8; API_Fatal(location, message); } @@ -2606,7 +2603,9 @@ bool v8::V8::IdleNotification(bool is_high_priority) { - if (!i::V8::IsRunning()) return false; + // Returning true tells the caller that it need not + // continue to call IdleNotification. + if (!i::V8::IsRunning()) return true; return i::V8::IdleNotification(is_high_priority); } ======================================= --- /branches/bleeding_edge/src/v8.cc Thu Oct 1 03:33:05 2009 +++ /branches/bleeding_edge/src/v8.cc Fri Oct 2 10:26:50 2009 @@ -170,9 +170,11 @@ bool V8::IdleNotification(bool is_high_priority) { - if (!FLAG_use_idle_notification) return false; + // Returning true tells the caller that there is no need to call + // IdleNotification again. + if (!FLAG_use_idle_notification) return true; // Ignore high priority instances of V8. - if (is_high_priority) return false; + if (is_high_priority) return true; // Tell the heap that it may want to adjust. return Heap::IdleNotification(); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
