Permalink
Browse files

Switched to using finally instead of a normal catch.

  • Loading branch information...
1 parent 2d2e4e7 commit f8cd28b9fff346a7365d5036dc81fe35746c4029 @jeresig committed Feb 23, 2009
Showing with 7 additions and 4 deletions.
  1. +7 −4 chrome/content/fireunit/fireunit.js
@@ -415,10 +415,13 @@ FBL.ns(function() { with (FBL) {
profile: function( fn ) {
win.console.profile();
win.__profile = fn;
- try { win.__profile(); } catch(e){}
- win.console.profileEnd();
- delete win.__profile;
- return this.getProfile();
+ try {
+ win.__profile();
+ } finally {
+ win.console.profileEnd();
+ delete win.__profile;
+ return this.getProfile();
+ }
},
/*

0 comments on commit f8cd28b

Please sign in to comment.