Chromium Code Reviews| Index: src/d8.cc |
| diff --git a/src/d8.cc b/src/d8.cc |
| index 55f0d4c2ab57cf74b0027a7c12c81f6df8573f20..76f636cc62c6277ca830efae0cba350ae7ce1904 100644 |
| --- a/src/d8.cc |
| +++ b/src/d8.cc |
| @@ -1253,14 +1253,20 @@ int Shell::RunMain(int argc, char* argv[]) { |
| Locker lock; |
| HandleScope scope; |
| Persistent<Context> context = CreateEvaluationContext(); |
| + if (options.last_run) { |
| + // Keep using the same context in the interactive shell |
|
Kasper Lund
2011/09/21 13:14:49
Terminate comment with .
Søren Thygesen Gjesse
2011/09/21 13:42:50
Done.
|
| + evaluation_context_ = context; |
| + // If the interactive debugger is enabled make sure to activate |
| + // it before running the files passed on the command line. |
| + if (i::FLAG_debugger && options.last_run) { |
|
Yang
2011/09/21 13:09:02
This breaks the shared library build. Putting this
Kasper Lund
2011/09/21 13:16:13
options.last_run will be true here, right?
Søren Thygesen Gjesse
2011/09/21 13:42:50
Done.
Søren Thygesen Gjesse
2011/09/21 13:42:50
Yes, removed check.
|
| + InstallUtilityScript(); |
| + } |
| + } |
| { |
| Context::Scope cscope(context); |
| options.isolate_sources[0].Execute(); |
| } |
| - if (options.last_run) { |
| - // Keep using the same context in the interactive shell |
| - evaluation_context_ = context; |
| - } else { |
| + if (!options.last_run) { |
| context.Dispose(); |
| } |
| @@ -1332,7 +1338,9 @@ int Shell::Main(int argc, char* argv[]) { |
| || !options.script_executed ) |
| && !options.test_shell ) { |
| #ifndef V8_SHARED |
| - InstallUtilityScript(); |
| + if (!i::FLAG_debugger) { |
| + InstallUtilityScript(); |
| + } |
| #endif // V8_SHARED |
| RunShell(); |
| } |