Remove unnecessary try/catch wrapping around a timeout-ed call.
authorEdward Lee <edilee@mozilla.com>
Fri, 06 Aug 2010 17:16:28 -0700
changeset 50261 414480c53b020daa80ddd3d2ed7b0c561bc30c48
parent 50260 a805e93769f8d360cf00423c6a096e6748b3bc8b
child 50262 2d1bfc993222fae8ee1b3ccca144dcefa91ae137
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b4pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Remove unnecessary try/catch wrapping around a timeout-ed call.
browser/base/content/tabview/modules/utils.js
--- a/browser/base/content/tabview/modules/utils.js
+++ b/browser/base/content/tabview/modules/utils.js
@@ -718,23 +718,18 @@ let Utils = {
     }
 
     // Return the modified object
     return target;
   },
 
   // ----------
   // Function: timeout
-  // wraps a delayed function call with try/catch
+  // delay a function call giving the timer as this
   timeout: function(func, delay) {
     let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.initWithCallback({
       notify: function notify() {
-        try {
-          func();
-        }
-        catch(ex) {
-          Utils.log(timer, ex);
-        }
+        func.call(timer);
       }
     }, delay, timer.TYPE_ONE_SHOT);
   }
 };