Fixed double printing of exceptions when enabeling the debugger.
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Jan 2009 09:43:18 +0000 (09:43 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Jan 2009 09:43:18 +0000 (09:43 +0000)
Detect the response to the continue command.
Review URL: http://codereview.chromium.org/17071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/d8.cc
src/d8.js

index 9f277bf..24eb722 100644 (file)
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -106,14 +106,14 @@ bool Shell::ExecuteString(Handle<String> source,
   Handle<Script> script = Script::Compile(source, name);
   if (script.IsEmpty()) {
     // Print errors that happened during compilation.
-    if (report_exceptions)
+    if (report_exceptions && !i::FLAG_debugger)
       ReportException(&try_catch);
     return false;
   } else {
     Handle<Value> result = script->Run();
     if (result.IsEmpty()) {
       // Print errors that happened during execution.
-      if (report_exceptions)
+      if (report_exceptions && !i::FLAG_debugger)
         ReportException(&try_catch);
       return false;
     } else {
index 51010a4..61467b9 100644 (file)
--- a/src/d8.js
+++ b/src/d8.js
@@ -705,9 +705,14 @@ function DebugResponseDetails(json_response) {
         details.text = result;
         break;
 
+      case 'continue':
+        details.text = "(running)";
+        break;
+        
       default:
         details.text =
-            'Response for unknown command \'' + response.command + '\'';
+            'Response for unknown command \'' + response.command + '\'' +
+            ' (' + json_response + ')';
     }
   } catch (e) {
     details.text = 'Error: "' + e + '" formatting response';