Bug 985980 - Restore off main thread logging for OS.File. r=froydnj
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Fri, 21 Mar 2014 09:07:30 -0400
changeset 174815 aa2073a4e646f55626a3e80c3d7d03959c4ce259
parent 174814 79617d6625f6a33d007092731886daa2c7136dff
child 174816 9863ccc8757357f6db700aa1ba61d29780d05caa
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfroydnj
bugs985980
milestone31.0a1
Bug 985980 - Restore off main thread logging for OS.File. r=froydnj
toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
--- a/toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
+++ b/toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
@@ -103,17 +103,17 @@ exports.defineLazyGetter = defineLazyGet
 ///////////////////// Logging
 
 /**
  * The default implementation of the logger.
  *
  * The choice of logger can be overridden with Config.TEST.
  */
 let gLogger;
-if (typeof console != "undefined" && console.log) {
+if (typeof window != "undefined" && window.console && console.log) {
   gLogger = console.log.bind(console, "OS");
 } else {
   gLogger = function(...args) {
     dump("OS " + args.join(" ") + "\n");
   };
 }
 
 /**