Skip to content

Commit

Permalink
Fix patcher around third-party wrappers:
Browse files Browse the repository at this point in the history
TypeError: Array is undefined after Cu.unload("…/patcher.jsm")
Thanks to Dumby: https://forum.mozilla-russia.org/viewtopic.php?pid=728469#p728469
  • Loading branch information
Infocatcher committed Dec 30, 2016
1 parent 8913577 commit 1595c92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion patcher.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var patcher = {
catch(e) {
Components.utils.reportError(e);
}
win[key].after.apply(this, [ret].concat(Array.prototype.slice.call(arguments)));
// Note: used "win.Array" to work after unloading of our .jsm
win[key].after.apply(this, [ret].concat(win.Array.prototype.slice.call(arguments)));
return ret;
}
: function wrapper() {
Expand Down

0 comments on commit 1595c92

Please sign in to comment.