mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 680164 - Expose OS on SpecialPowers, r=jmaher
This commit is contained in:
parent
be21706dbd
commit
72675bf33f
@ -294,6 +294,20 @@ SpecialPowers.prototype = {
|
||||
return this._xpcomabi;
|
||||
},
|
||||
|
||||
_os: null,
|
||||
|
||||
get OS() {
|
||||
if (this._os != null)
|
||||
return this._os;
|
||||
|
||||
var xulRuntime = Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo)
|
||||
.QueryInterface(Components.interfaces.nsIXULRuntime);
|
||||
|
||||
this._os = xulRuntime.OS;
|
||||
return this._os;
|
||||
},
|
||||
|
||||
registerProcessCrashObservers: function() {
|
||||
addMessageListener("SPProcessCrashService", this._messageListener);
|
||||
sendSyncMessage("SPProcessCrashService", { op: "register-observer" });
|
||||
|
Loading…
Reference in New Issue
Block a user