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

Unified Diff: src/d8.cc

Issue 42415: Make sure that the d8 shell calls OnExit in case of exceptions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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
===================================================================
--- src/d8.cc (revision 1547)
+++ src/d8.cc (working copy)
@@ -586,8 +586,10 @@
v8::HandleScope handle_scope;
v8::Handle<v8::String> file_name = v8::String::New("unnamed");
v8::Handle<v8::String> source = v8::String::New(argv[i + 1]);
- if (!ExecuteString(source, file_name, false, true))
+ if (!ExecuteString(source, file_name, false, true)) {
+ OnExit();
return 1;
+ }
i++;
} else if (strcmp(str, "-p") == 0 && i + 1 < argc) {
int size = 0;
@@ -607,8 +609,10 @@
printf("Error reading '%s'\n", str);
return 1;
}
- if (!ExecuteString(source, file_name, false, true))
+ if (!ExecuteString(source, file_name, false, true)) {
+ OnExit();
return 1;
+ }
}
}
« 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