Add missing context disposed notifications in test-api.
Move send-idle-notification flag to d8 options so that it is available in d8
when v8 is build as a shared libarary.
R=yangguo@chromium.org
Review URL: https://chromiumcodereview.appspot.com/
10834405
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12343
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
} else if (strcmp(argv[i], "--test") == 0) {
options.test_shell = true;
argv[i] = NULL;
+ } else if (strcmp(argv[i], "--send-idle-notification") == 0) {
+ options.send_idle_notification = true;
+ argv[i] = NULL;
} else if (strcmp(argv[i], "--preemption") == 0) {
#ifdef V8_SHARED
printf("D8 with shared library does not support multi-threading\n");
}
if (!options.last_run) {
context.Dispose();
-#if !defined(V8_SHARED)
- if (i::FLAG_send_idle_notification) {
+ if (options.send_idle_notification) {
const int kLongIdlePauseInMs = 1000;
V8::ContextDisposedNotification();
V8::IdleNotification(kLongIdlePauseInMs);
}
-#endif // !V8_SHARED
}
#ifndef V8_SHARED
#endif // V8_SHARED
script_executed(false),
last_run(true),
+ send_idle_notification(false),
stress_opt(false),
stress_deopt(false),
interactive_shell(false),
#endif // V8_SHARED
bool script_executed;
bool last_run;
+ bool send_idle_notification;
bool stress_opt;
bool stress_deopt;
bool interactive_shell;
// v8.cc
DEFINE_bool(use_idle_notification, true,
"Use idle notification to reduce memory footprint.")
-
-DEFINE_bool(send_idle_notification, false,
- "Send idle notifcation between stress runs.")
// ic.cc
DEFINE_bool(use_ic, true, "use inline caching")
context->Exit();
}
context.Dispose();
+ v8::V8::ContextDisposedNotification();
for (gc_count = 1; gc_count < 10; gc_count++) {
other_context->Enter();
CompileRun(source_simple);
context->Exit();
}
context.Dispose();
+ v8::V8::ContextDisposedNotification();
for (gc_count = 1; gc_count < 10; gc_count++) {
other_context->Enter();
CompileRun(source_eval);
CHECK_EQ(1, GetGlobalObjectsCount());
other_context.Dispose();
+ v8::V8::ContextDisposedNotification();
}