Author: [email protected]
Date: Thu Mar 19 15:09:14 2009
New Revision: 1554

Modified:
    branches/bleeding_edge/src/d8.cc

Log:
Make sure that the d8 shell calls OnExit in case of exceptions.
Review URL: http://codereview.chromium.org/42415

Modified: branches/bleeding_edge/src/d8.cc
==============================================================================
--- branches/bleeding_edge/src/d8.cc    (original)
+++ branches/bleeding_edge/src/d8.cc    Thu Mar 19 15:09:14 2009
@@ -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;
+        }
        }
      }


--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to