Bug 1150052 - Report exceptions that occur in MozLoop object APIs directly to the console, so we'll be able to recognize errors better. r=Standard8, a=lizzard
authorMike de Boer <mdeboer@mozilla.com>
Thu, 02 Apr 2015 15:28:45 +0200
changeset 254849 9becaa8aee1834758a4a527e0d11020225e7c264
parent 254848 95103b517141cd9819cadf91989798a5db9fbd14
child 254850 4bdab5a3e2d88736e4868fd0d75c8f856b2d2728
push id7884
push userryanvm@gmail.com
push dateMon, 06 Apr 2015 20:14:59 +0000
treeherdermozilla-aurora@e6c47797b6d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, lizzard
bugs1150052
milestone39.0a2
Bug 1150052 - Report exceptions that occur in MozLoop object APIs directly to the console, so we'll be able to recognize errors better. r=Standard8, a=lizzard
browser/components/loop/MozLoopAPI.jsm
--- a/browser/components/loop/MozLoopAPI.jsm
+++ b/browser/components/loop/MozLoopAPI.jsm
@@ -162,16 +162,17 @@ const injectObjectAPI = function(api, ta
           }
           lastParam(...[cloneValueInto(r, targetWindow) for (r of results)]);
         });
       } else {
         try {
           lastParam = cloneValueInto(lastParam, api);
           return cloneValueInto(api[func](...params, lastParam), targetWindow);
         } catch (ex) {
+          MozLoopService.log.error(func + " error: ", ex, params, lastParam);
           return cloneValueInto(ex, targetWindow);
         }
       }
     };
   });
 
   let contentObj = Cu.cloneInto(injectedAPI, targetWindow, {cloneFunctions: true});
   // Since we deny preventExtensions on XrayWrappers, because Xray semantics make