mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 680164 - Expose OS on SpecialPowers, r=jmaher
This commit is contained in:
parent
34dc80301a
commit
fb0739327b
@ -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