Bug 887334 - Stop failing on strict-failures/warnings in server debug tests. r=me
authorBobby Holley <bobbyholley@gmail.com>
Wed, 31 Jul 2013 10:59:31 -0700
changeset 148191 8d21aed06d49618cad34a80e7620c54aec486e5e
parent 148190 1662a10d65d0e99f7e1c3c319381d4c85ad8f245
child 148192 3266c1d738162e5d03c922d9bc8435188e410f62
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs887334
milestone24.0a2
Bug 887334 - Stop failing on strict-failures/warnings in server debug tests. r=me The reason this appears on aurora automation and not on central has to do with the XPConnect exception guessing game. I stopped investigating there.
toolkit/devtools/server/tests/unit/head_dbg.js
--- a/toolkit/devtools/server/tests/unit/head_dbg.js
+++ b/toolkit/devtools/server/tests/unit/head_dbg.js
@@ -44,39 +44,42 @@ function scriptErrorFlagsToKind(aFlags) 
 }
 
 // Register a console listener, so console messages don't just disappear
 // into the ether.
 let errorCount = 0;
 let listener = {
   observe: function (aMessage) {
     errorCount++;
+    var shouldThrow = true;
     try {
       // If we've been given an nsIScriptError, then we can print out
       // something nicely formatted, for tools like Emacs to pick up.
       var scriptError = aMessage.QueryInterface(Ci.nsIScriptError);
       dump(aMessage.sourceName + ":" + aMessage.lineNumber + ": " +
            scriptErrorFlagsToKind(aMessage.flags) + ": " +
            aMessage.errorMessage + "\n");
       var string = aMessage.errorMessage;
+      shouldThrow = !aMessage.flags;
     } catch (x) {
       // Be a little paranoid with message, as the whole goal here is to lose
       // no information.
       try {
         var string = "" + aMessage.message;
       } catch (x) {
         var string = "<error converting error message to string>";
       }
     }
 
     // Make sure we exit all nested event loops so that the test can finish.
     while (DebuggerServer.xpcInspector.eventLoopNestLevel > 0) {
       DebuggerServer.xpcInspector.exitNestedEventLoop();
     }
-    do_throw("head_dbg.js got console message: " + string + "\n");
+    if (shouldThrow)
+      do_throw("head_dbg.js got console message: " + string + "\n");
   }
 };
 
 let consoleService = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService);
 consoleService.registerListener(listener);
 
 function check_except(func)
 {