Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index ffc58e6478377f592210946e292b1a72d9337dfe..b04fa71bdf5e7025851b6af6dcda38eb6ed6d22c 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -1345,7 +1345,7 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[]) { |
{ |
HandleScope scope(isolate); |
Local<Context> context = CreateEvaluationContext(isolate); |
- if (options.last_run) { |
+ if (options.last_run && options.interactive_shell) { |
// Keep using the same context in the interactive shell. |
evaluation_context_.Reset(isolate, context); |
#ifndef V8_SHARED |
@@ -1362,12 +1362,10 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[]) { |
options.isolate_sources[0].Execute(isolate); |
} |
} |
- if (!options.last_run) { |
- if (options.send_idle_notification) { |
- const int kLongIdlePauseInMs = 1000; |
- V8::ContextDisposedNotification(); |
- V8::IdleNotification(kLongIdlePauseInMs); |
- } |
+ if (options.send_idle_notification) { |
+ const int kLongIdlePauseInMs = 1000; |
+ V8::ContextDisposedNotification(); |
+ V8::IdleNotification(kLongIdlePauseInMs); |
} |
#ifndef V8_SHARED |