Reviewers: jochen,
Description:
Revert "Add a flag to d8 to invoke weak callbacks"
This reverts r21529.
TBR=joc...@chromium.org
Please review this at https://codereview.chromium.org/302543004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -26 lines):
M src/d8.h
M src/d8.cc
M tools/run-tests.py
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
b1d996a3f06360005e655671e6ee178dd9696a72..73bde94aad291cfbe6f20786073841c93d388071
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1190,21 +1190,6 @@ i::Thread::Options SourceGroup::GetThreadOptions() {
}
-void SuggestivelyAskForAggressiveGC() {
- if (Shell::options.send_idle_notification) {
- const int kLongIdlePauseInMs = 1000;
- V8::ContextDisposedNotification();
- V8::IdleNotification(kLongIdlePauseInMs);
- }
- if (Shell::options.invoke_weak_callbacks) {
- // By sending a low memory notifications, we will try hard to collect
- // all garbage and will therefore also invoke all weak callbacks of
- // actually unreachable persistent handles.
- V8::LowMemoryNotification();
- }
-}
-
-
void SourceGroup::ExecuteInThread() {
Isolate* isolate = Isolate::New();
do {
@@ -1221,11 +1206,14 @@ void SourceGroup::ExecuteInThread() {
Execute(isolate);
}
}
- SuggestivelyAskForAggressiveGC();
+ if (Shell::options.send_idle_notification) {
+ const int kLongIdlePauseInMs = 1000;
+ V8::ContextDisposedNotification();
+ V8::IdleNotification(kLongIdlePauseInMs);
+ }
}
done_semaphore_.Signal();
} while (!Shell::options.last_run);
-
isolate->Dispose();
}
@@ -1286,11 +1274,6 @@ bool Shell::SetOptions(int argc, char* argv[]) {
} else if (strcmp(argv[i], "--send-idle-notification") == 0) {
options.send_idle_notification = true;
argv[i] = NULL;
- } else if (strcmp(argv[i], "--invoke-weak-callbacks") == 0) {
- options.invoke_weak_callbacks = true;
- // TODO(jochen) See issue 3351
- options.send_idle_notification = true;
- argv[i] = NULL;
} else if (strcmp(argv[i], "-f") == 0) {
// Ignore any -f flags for compatibility with other stand-alone
// JavaScript engines.
@@ -1379,7 +1362,11 @@ int Shell::RunMain(Isolate* isolate, int argc, char*
argv[]) {
options.isolate_sources[0].Execute(isolate);
}
}
- SuggestivelyAskForAggressiveGC();
+ if (options.send_idle_notification) {
+ const int kLongIdlePauseInMs = 1000;
+ V8::ContextDisposedNotification();
+ V8::IdleNotification(kLongIdlePauseInMs);
+ }
#ifndef V8_SHARED
for (int i = 1; i < options.num_isolates; ++i) {
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index
1f7f5d1ee6bd77bbccfb48688aafcc306cba3b93..2c7513f553dff17a1935a9ee2b736c54467853e2
100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -198,7 +198,6 @@ class ShellOptions {
script_executed(false),
last_run(true),
send_idle_notification(false),
- invoke_weak_callbacks(false),
stress_opt(false),
stress_deopt(false),
interactive_shell(false),
@@ -221,7 +220,6 @@ class ShellOptions {
bool script_executed;
bool last_run;
bool send_idle_notification;
- bool invoke_weak_callbacks;
bool stress_opt;
bool stress_deopt;
bool interactive_shell;
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
5824f250dd695b2ba7a1c9c57ac0562110be7546..b02fcfa94166fa0d516645a68f46b69de90a384b
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -257,7 +257,7 @@ def ProcessOptions(options):
options.extra_flags += GC_STRESS_FLAGS
if options.asan:
- options.extra_flags.append("--invoke-weak-callbacks")
+ options.extra_flags.append("--send-idle-notification")
if options.j == 0:
options.j = multiprocessing.cpu_count()
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.