Bug 887580 - Properly export object in profile.jsm and policy.jsm. r=gps

This commit is contained in:
Stefan Mirea 2013-06-26 17:01:45 -07:00
parent 51ecb97da1
commit dc7ba6c33f
2 changed files with 8 additions and 10 deletions

View File

@ -134,7 +134,7 @@ Object.freeze(NotifyPolicyRequest.prototype);
* Receivers of instances of this type should not attempt to do anything with
* the instance except call one of the on* methods.
*/
function DataSubmissionRequest(promise, expiresDate, isDelete) {
this.DataSubmissionRequest = function (promise, expiresDate, isDelete) {
this.promise = promise;
this.expiresDate = expiresDate;
this.isDelete = isDelete;
@ -143,7 +143,7 @@ function DataSubmissionRequest(promise, expiresDate, isDelete) {
this.reason = null;
}
DataSubmissionRequest.prototype = {
this.DataSubmissionRequest.prototype = Object.freeze({
NO_DATA_AVAILABLE: "no-data-available",
SUBMISSION_SUCCESS: "success",
SUBMISSION_FAILURE_SOFT: "failure-soft",
@ -210,9 +210,7 @@ DataSubmissionRequest.prototype = {
this.promise.resolve(this);
return this.promise.promise;
},
};
Object.freeze(DataSubmissionRequest.prototype);
});
/**
* Manages scheduling of Firefox Health Report data submission.
@ -317,7 +315,7 @@ this.DataReportingPolicy = function (prefs, healthReportPrefs, listener) {
this._inProgressSubmissionRequest = null;
};
DataReportingPolicy.prototype = Object.freeze({
this.DataReportingPolicy.prototype = Object.freeze({
/**
* How long after first run we should notify about data submission.
*/

View File

@ -31,14 +31,14 @@ Cu.import("resource://services-common/utils.js");
// Profile creation time access.
// This is separate from the provider to simplify testing and enable extraction
// to a shared location in the future.
function ProfileCreationTimeAccessor(profile, log) {
this.ProfileCreationTimeAccessor = function(profile, log) {
this.profilePath = profile || OS.Constants.Path.profileDir;
if (!this.profilePath) {
throw new Error("No profile directory.");
}
this._log = log || {"debug": function (s) { dump(s + "\n"); }};
}
ProfileCreationTimeAccessor.prototype = {
this.ProfileCreationTimeAccessor.prototype = {
/**
* There are three ways we can get our creation time:
*
@ -210,10 +210,10 @@ function truncate(msec) {
/**
* A Metrics.Provider for profile metadata, such as profile creation time.
*/
function ProfileMetadataProvider() {
this.ProfileMetadataProvider = function() {
Metrics.Provider.call(this);
}
ProfileMetadataProvider.prototype = {
this.ProfileMetadataProvider.prototype = {
__proto__: Metrics.Provider.prototype,
name: "org.mozilla.profile",