mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809265 - Update Identity js and jsm modules to use new global object. r=benadida
--HG-- extra : rebase_source : e28a25b4a6556157532bcd082878ae36f6741607
This commit is contained in:
parent
cf0e5821c6
commit
4db96ce158
@ -69,7 +69,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["SignInToWebsiteController"];
|
||||
this.EXPORTED_SYMBOLS = ["SignInToWebsiteController"];
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
@ -253,7 +253,7 @@ let Pipe = {
|
||||
* controller into IdentityService and DOM, and ultimately up to the
|
||||
* Relying Party, which is open in a different window context.
|
||||
*/
|
||||
let SignInToWebsiteController = {
|
||||
this.SignInToWebsiteController = {
|
||||
|
||||
/*
|
||||
* Initialize the controller. To use a different gaia communication pipe,
|
||||
|
@ -8,10 +8,11 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function IDService() {
|
||||
this.IDService = function IDService() {
|
||||
this.wrappedJSObject = this;
|
||||
}
|
||||
IDService.prototype = {
|
||||
};
|
||||
|
||||
this.IDService.prototype = {
|
||||
classID: Components.ID("{baa581e5-8e72-406c-8c9f-dcd4b23a6f82}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["checkRenamed"];
|
||||
this.EXPORTED_SYMBOLS = ["checkDeprecated", "checkRenamed"];
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
@ -23,15 +23,15 @@ function defined(item) {
|
||||
return typeof item !== 'undefined';
|
||||
}
|
||||
|
||||
function checkDeprecated(aOptions, aField) {
|
||||
var checkDeprecated = this.checkDeprecated = function checkDeprecated(aOptions, aField) {
|
||||
if (defined(aOptions[aField])) {
|
||||
log("WARNING: field is deprecated:", aField);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
let checkRenamed = function checkRenamed(aOptions, aOldName, aNewName) {
|
||||
this.checkRenamed = function checkRenamed(aOptions, aOldName, aNewName) {
|
||||
if (defined(aOptions[aOldName]) &&
|
||||
defined(aOptions[aNewName])) {
|
||||
let err = "You cannot provide both " + aOldName + " and " + aNewName;
|
||||
@ -43,4 +43,4 @@ let checkRenamed = function checkRenamed(aOptions, aOldName, aNewName) {
|
||||
aOptions[aNewName] = aOptions[aOldName];
|
||||
delete(aOptions[aOldName]);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["IdentityService"];
|
||||
this.EXPORTED_SYMBOLS = ["IdentityService"];
|
||||
|
||||
const Cu = Components.utils;
|
||||
const Ci = Components.interfaces;
|
||||
@ -372,4 +372,4 @@ IDService.prototype = {
|
||||
|
||||
};
|
||||
|
||||
let IdentityService = new IDService();
|
||||
this.IdentityService = new IDService();
|
||||
|
@ -37,9 +37,9 @@ this.Sandbox = function Sandbox(aURL, aCallback) {
|
||||
this._log("Creating sandbox for:", this._url);
|
||||
this._createFrame();
|
||||
this._createSandbox(aCallback);
|
||||
}
|
||||
};
|
||||
|
||||
Sandbox.prototype = {
|
||||
this.Sandbox.prototype = {
|
||||
|
||||
/**
|
||||
* Use the outer window ID as the identifier of the sandbox.
|
||||
|
@ -126,4 +126,4 @@ jwcryptoClass.prototype = {
|
||||
};
|
||||
|
||||
this.jwcrypto = new jwcryptoClass();
|
||||
jwcrypto.ALGORITHMS = ALGORITHMS;
|
||||
this.jwcrypto.ALGORITHMS = ALGORITHMS;
|
||||
|
Loading…
Reference in New Issue
Block a user