{
HandleScope scope(isolate);
Local<Context> context = CreateEvaluationContext(isolate);
- if (options.last_run && options.interactive_shell) {
+ if (options.last_run && options.use_interactive_shell()) {
// Keep using the same context in the interactive shell.
evaluation_context_.Reset(isolate, context);
#ifndef V8_SHARED
// Run interactive shell if explicitly requested or if no script has been
// executed, but never on --test
- if (( options.interactive_shell || !options.script_executed )
- && !options.test_shell ) {
+ if (options.use_interactive_shell()) {
#ifndef V8_SHARED
if (!i::FLAG_debugger) {
InstallUtilityScript(isolate);
delete[] isolate_sources;
}
+ bool use_interactive_shell() {
+ return (interactive_shell || !script_executed) && !test_shell;
+ }
+
bool script_executed;
bool last_run;
bool send_idle_notification;