Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/d8.cc

Issue 7981023: Turn on d8 interactive debugging before running files passed on the command line (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 55f0d4c2ab57cf74b0027a7c12c81f6df8573f20..ead17a2649bc0605ffc6ae3dbf17cd5de5a58ed7 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1253,14 +1253,22 @@ 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.
+ evaluation_context_ = context;
+#ifndef V8_SHARED
+ // If the interactive debugger is enabled make sure to activate
+ // it before running the files passed on the command line.
+ if (i::FLAG_debugger) {
+ InstallUtilityScript();
+ }
+#endif // V8_SHARED
+ }
{
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 +1340,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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698