mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877478 - Have SpecialPowers.addObserver modify the observe callback to wrap arguments. r=mrbkap
|subject| is quite often an XPCOM object that's not accessible to content.
This commit is contained in:
parent
6c466f082b
commit
5d40948d93
@ -905,6 +905,8 @@ SpecialPowersAPI.prototype = {
|
||||
},
|
||||
|
||||
addObserver: function(obs, notification, weak) {
|
||||
if (typeof obs == 'object' && obs.observe.name != 'SpecialPowersCallbackWrapper')
|
||||
obs.observe = wrapCallback(obs.observe);
|
||||
var obsvc = Cc['@mozilla.org/observer-service;1']
|
||||
.getService(Ci.nsIObserverService);
|
||||
obsvc.addObserver(obs, notification, weak);
|
||||
|
Loading…
Reference in New Issue
Block a user