Bug 1397460 - Don't throw for a failure in cpows_child.js. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Wed, 06 Sep 2017 13:45:22 -0700
changeset 660315 408f4d731691fd7fa760d4633749a9f45df1e54a
parent 660314 1676e654729a8aff125b81b9b55bbf9e80a97fb8
child 730208 9781fddd470696acf9c4f625c09271d418a7cb8a
push id78371
push userbmo:continuation@gmail.com
push dateWed, 06 Sep 2017 21:14:39 +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()
 {