Skip to content

Commit

Permalink
Patcher: always restore wrapped function
Browse files Browse the repository at this point in the history
(part 1 for #46, enhancement for #45)
  • Loading branch information
Infocatcher committed Apr 26, 2013
1 parent 49f4ad6 commit 91602d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2454,10 +2454,10 @@ var patcher = {
var win = Components.utils.getGlobalForObject(obj);
var name = key;
key = this.wrapNS + key;
var orig, wrapped;
var orig = obj[meth];
var wrapped;
if(!(key in win)) {
_log("[patcher] Patch " + name);
orig = obj[meth];
wrapped = obj[meth] = callAfter
? function wrapper() {
var res = win[key].before.apply(this, arguments);
Expand Down

0 comments on commit 91602d7

Please sign in to comment.