Revision: 21510
Author:   [email protected]
Date:     Tue May 27 07:19:32 2014 UTC
Log:      Fix d8's interactive shell.

[email protected]

Review URL: https://codereview.chromium.org/305553002
http://code.google.com/p/v8/source/detail?r=21510

Modified:
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/d8.h

=======================================
--- /branches/bleeding_edge/src/d8.cc   Mon May 26 15:18:45 2014 UTC
+++ /branches/bleeding_edge/src/d8.cc   Tue May 27 07:19:32 2014 UTC
@@ -1345,7 +1345,7 @@
   {
     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
@@ -1524,8 +1524,7 @@

// 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);
=======================================
--- /branches/bleeding_edge/src/d8.h    Wed May 14 16:28:46 2014 UTC
+++ /branches/bleeding_edge/src/d8.h    Tue May 27 07:19:32 2014 UTC
@@ -212,6 +212,10 @@
   ~ShellOptions() {
     delete[] isolate_sources;
   }
+
+  bool use_interactive_shell() {
+    return (interactive_shell || !script_executed) && !test_shell;
+  }

   bool script_executed;
   bool last_run;

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to