Bug 1397460 - Don't throw for a failure in cpows_child.js. r=billm
authorAndrew McCreight <continuation@gmail.com>
Wed, 06 Sep 2017 13:45:22 -0700
changeset 660390 a5aa81a626da9e7cf14f6600ee8ac0ed9b6cee1f
parent 660389 ad5c7dbaa4d6c2f31c3b5a89c159f781a2f92902
child 660391 bc13c43f67712786325bdea324246bea41a0b076
push id78390
push userbmo:emilio@crisal.io
push dateWed, 06 Sep 2017 23:04:15 +0000
reviewersbillm
bugs1397460
milestone57.0a1
Bug 1397460 - Don't throw for a failure in cpows_child.js. r=billm When ok() is passed false, we send a message to the parent, which will cause the test to fail. Throwing in this helper in the child just makes the test hang for a while. MozReview-Commit-ID: 4gwBACPYfDO
dom/base/test/chrome/cpows_child.js
--- a/dom/base/test/chrome/cpows_child.js
+++ b/dom/base/test/chrome/cpows_child.js
@@ -40,17 +40,16 @@ var Ci = Components.interfaces;
 
   go();
 })();
 
 function ok(condition, message) {
   dump('condition: ' + condition  + ', ' + message + '\n');
   if (!condition) {
     sendAsyncMessage("cpows:fail", { message: message });
-    throw 'failed check: ' + message;
   }
 }
 
 var sync_obj;
 var async_obj;
 
 function make_object()
 {