Commit bec08c35 authored by mike@belshe.com's avatar mike@belshe.com

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?


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8925e8af
......@@ -107,9 +107,6 @@ int i::Internals::kProxyType = PROXY_TYPE;
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::Dispose() {
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);
}
......
......@@ -170,9 +170,11 @@ uint32_t V8::Random() {
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();
......
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