Backed out changeset 91c1bd885ad9 (bug 1121577) for Gip failures on a CLOSED TREE

This commit is contained in:
Wes Kocher 2015-02-10 15:09:52 -08:00
parent 64c568efe7
commit 324dcc6b5a
3 changed files with 12 additions and 29 deletions

View File

@ -16,6 +16,8 @@ let logger = Log.repository.getLogger("Marionette");
let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Ci.mozIJSSubScriptLoader);
let specialpowers = {};
loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js",
specialpowers);
//list of OOP frames that has the frame script loaded
let remoteFrames = [];
@ -106,11 +108,6 @@ FrameManager.prototype = {
let oopFrame = frameWindow.document.getElementsByTagName("iframe")[message.json.frame]; //find the OOP frame
let mm = oopFrame.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.messageManager; //get the OOP frame's mm
if (!specialpowers.hasOwnProperty("specialPowersObserver")) {
loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js",
specialpowers);
}
// See if this frame already has our frame script loaded in it; if so,
// just wake it up.
for (let i = 0; i < remoteFrames.length; i++) {

View File

@ -25,7 +25,14 @@ loader.loadSubScript("chrome://marionette/content/ChromeUtils.js", utils);
loader.loadSubScript("chrome://marionette/content/atoms.js", utils);
loader.loadSubScript("chrome://marionette/content/marionette-sendkeys.js", utils);
// SpecialPowers requires insecure automation-only features that we put behind a pref.
Services.prefs.setBoolPref('security.turn_off_all_security_so_that_viruses_can_take_over_this_computer',
true);
let specialpowers = {};
loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js",
specialpowers);
specialpowers.specialPowersObserver = new specialpowers.SpecialPowersObserver();
specialpowers.specialPowersObserver.init();
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
@ -49,7 +56,6 @@ loader.loadSubScript("resource://gre/modules/devtools/transport/transport.js");
let bypassOffline = false;
let qemu = "0";
let device = null;
const SECURITY_PREF = 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer';
XPCOMUtils.defineLazyServiceGetter(this, "cookieManager",
"@mozilla.org/cookiemanager;1",
@ -157,7 +163,6 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer)
this.currentFrameElement = null;
this.testName = null;
this.mozBrowserClose = null;
this.enabled_security_pref = false;
this.sandbox = null;
this.oopFrameId = null; // frame ID of current remote frame, used for mozbrowserclose events
this.sessionCapabilities = {
@ -579,23 +584,6 @@ MarionetteServerConnection.prototype = {
this.command_id = this.getCommandId();
this.newSessionCommandId = this.command_id;
// SpecialPowers requires insecure automation-only features that we put behind a pref
let security_pref_value = false;
try {
security_pref_value = Services.prefs.getBoolPref(SECURITY_PREF);
} catch(e) {}
if (!security_pref_value) {
this.enabled_security_pref = true;
Services.prefs.setBoolPref(SECURITY_PREF, true);
}
if (!specialpowers.hasOwnProperty('specialPowersObserver')) {
loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js",
specialpowers);
specialpowers.specialPowersObserver = new specialpowers.SpecialPowersObserver();
specialpowers.specialPowersObserver.init();
}
this.scriptTimeout = 10000;
if (aRequest && aRequest.parameters) {
this.sessionId = aRequest.parameters.session_id ? aRequest.parameters.session_id : null;

View File

@ -16,15 +16,13 @@ if (typeof(Cc) == 'undefined') {
/**
* Special Powers Exception - used to throw exceptions nicely
**/
this.SpecialPowersException = function SpecialPowersException(aMsg) {
function SpecialPowersException(aMsg) {
this.message = aMsg;
this.name = "SpecialPowersException";
}
SpecialPowersException.prototype = {
toString: function SPE_toString() {
return this.name + ': "' + this.message + '"';
}
SpecialPowersException.prototype.toString = function() {
return this.name + ': "' + this.message + '"';
};
this.SpecialPowersObserverAPI = function SpecialPowersObserverAPI() {