Bug 1149347 - Don't initialize SpecialPowers unconditionally, r=ato

This commit is contained in:
Jonathan Griffin 2015-03-31 09:44:02 -07:00
Родитель fe2626ebf3
Коммит 9404a5bc8f
1 изменённых файлов: 0 добавлений и 15 удалений

Просмотреть файл

@ -53,20 +53,6 @@ this.MarionetteServer = function(port, forceLocal) {
this.alive = false;
};
/**
* Initialises the Marionette server by loading in the special powers
* which is required to provide some automation-only features.
*/
MarionetteServer.prototype.init = function() {
// SpecialPowers requires insecure automation-only features that we put behind a pref
Services.prefs.setBoolPref(SPECIAL_POWERS_PREF, true);
let specialpowers = {};
loader.loadSubScript(
"chrome://specialpowers/content/SpecialPowersObserver.js", specialpowers);
specialpowers.specialPowersObserver = new specialpowers.SpecialPowersObserver();
specialpowers.specialPowersObserver.init();
};
/**
* Function that takes an Emulator and produces a GeckoDriver.
*
@ -115,7 +101,6 @@ MarionetteServer.prototype.start = function() {
if (this.alive) {
return;
}
this.init();
let flags = Ci.nsIServerSocket.KeepWhenOffline;
if (this.forceLocal) {
flags |= Ci.nsIServerSocket.LoopbackOnly;