Bug 1307645 - Avoid this logging call when running mochitests to fix an intermittent orange. r=tbsaunde
authorBlake Kaplan <mrbkap@gmail.com>
Wed, 19 Oct 2016 17:44:04 -0700
changeset 319900 3ed4c1405691d36144387453876a3cd1234b3b13
parent 319899 1da68ee13f25373b5a8f310fe3d598f4f36dcf72
child 319901 c1ef258c04f1960f6c014394f371fc0d3068ccb8
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1307645
milestone52.0a1
Bug 1307645 - Avoid this logging call when running mochitests to fix an intermittent orange. r=tbsaunde MozReview-Commit-ID: BWdrTM2JdZs
accessible/tests/browser/e10s/events.js
--- a/accessible/tests/browser/e10s/events.js
+++ b/accessible/tests/browser/e10s/events.js
@@ -63,17 +63,21 @@ function waitForEvent(eventType, expecte
   return new Promise(resolve => {
     let eventObserver = {
       observe(subject, topic, data) {
         if (topic !== 'accessible-event') {
           return;
         }
 
         let event = subject.QueryInterface(nsIAccessibleEvent);
-        Logger.log(eventToString(event));
+        if (Logger.enabled) {
+          // Avoid calling eventToString if the logger isn't enabled in order
+          // to avoid an intermittent crash (bug 1307645).
+          Logger.log(eventToString(event));
+        }
 
         // If event type does not match expected type, skip the event.
         if (event.eventType !== eventType) {
           return;
         }
 
         let acc = event.accessible;
         let id = getAccessibleDOMNodeID(acc);