mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Backed out changeset 91c1bd885ad9 (bug 1121577) for Gip failures on a CLOSED TREE
This commit is contained in:
parent
69d958d922
commit
7e3fd41b91
@ -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++) {
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user