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

Unified Diff: samples/shell.cc

Issue 6526016: Properly process try/finally blocks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing Mads' comments Created 9 years, 10 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 | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/shell.cc
diff --git a/samples/shell.cc b/samples/shell.cc
index 6b67df6c6c56467611d4277426df9af250e07574..64f78f02c61ec6df0e0c1a8f2504478e2b0816be 100644
--- a/samples/shell.cc
+++ b/samples/shell.cc
@@ -27,6 +27,7 @@
#include <v8.h>
#include <v8-testing.h>
+#include <assert.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
@@ -290,11 +291,13 @@ bool ExecuteString(v8::Handle<v8::String> source,
} else {
v8::Handle<v8::Value> result = script->Run();
if (result.IsEmpty()) {
+ assert(try_catch.HasCaught());
// Print errors that happened during execution.
if (report_exceptions)
ReportException(&try_catch);
return false;
} else {
+ assert(!try_catch.HasCaught());
if (print_result && !result->IsUndefined()) {
// If all went well and the result wasn't undefined then print
// the returned value.
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698