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:
Jed Parsons 2012-11-08 20:54:13 -05:00
parent cf0e5821c6
commit 4db96ce158
6 changed files with 16 additions and 15 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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]);
}
};
};

View File

@ -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();

View File

@ -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.

View File

@ -126,4 +126,4 @@ jwcryptoClass.prototype = {
};
this.jwcrypto = new jwcryptoClass();
jwcrypto.ALGORITHMS = ALGORITHMS;
this.jwcrypto.ALGORITHMS = ALGORITHMS;