Fix test failures introduced by r12342.
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
This commit is contained in:
parent
27fb8c2cf6
commit
bac8e56f8d
@ -1634,6 +1634,9 @@ bool Shell::SetOptions(int argc, char* argv[]) {
|
||||
} 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");
|
||||
@ -1790,13 +1793,11 @@ int Shell::RunMain(int argc, char* argv[]) {
|
||||
}
|
||||
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
|
||||
|
2
src/d8.h
2
src/d8.h
@ -227,6 +227,7 @@ class ShellOptions {
|
||||
#endif // V8_SHARED
|
||||
script_executed(false),
|
||||
last_run(true),
|
||||
send_idle_notification(false),
|
||||
stress_opt(false),
|
||||
stress_deopt(false),
|
||||
interactive_shell(false),
|
||||
@ -249,6 +250,7 @@ class ShellOptions {
|
||||
#endif // V8_SHARED
|
||||
bool script_executed;
|
||||
bool last_run;
|
||||
bool send_idle_notification;
|
||||
bool stress_opt;
|
||||
bool stress_deopt;
|
||||
bool interactive_shell;
|
||||
|
@ -390,9 +390,6 @@ DEFINE_bool(track_gc_object_stats, false,
|
||||
// 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")
|
||||
|
||||
|
@ -14586,6 +14586,7 @@ TEST(Regress528) {
|
||||
context->Exit();
|
||||
}
|
||||
context.Dispose();
|
||||
v8::V8::ContextDisposedNotification();
|
||||
for (gc_count = 1; gc_count < 10; gc_count++) {
|
||||
other_context->Enter();
|
||||
CompileRun(source_simple);
|
||||
@ -14608,6 +14609,7 @@ TEST(Regress528) {
|
||||
context->Exit();
|
||||
}
|
||||
context.Dispose();
|
||||
v8::V8::ContextDisposedNotification();
|
||||
for (gc_count = 1; gc_count < 10; gc_count++) {
|
||||
other_context->Enter();
|
||||
CompileRun(source_eval);
|
||||
@ -14647,6 +14649,7 @@ TEST(Regress528) {
|
||||
CHECK_EQ(1, GetGlobalObjectsCount());
|
||||
|
||||
other_context.Dispose();
|
||||
v8::V8::ContextDisposedNotification();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user