Bug 836177 - Temporarily merge more JSMs to mitigate compartment overhead; r=rnewman

As with bug 834936, this is meant to be temporary until zones land and
we have decent JSM overhead levels.
This commit is contained in:
Gregory Szorc 2013-01-30 07:07:22 -08:00
parent c47eb8f3a2
commit 5758dc5c47
8 changed files with 29 additions and 8 deletions

View File

@ -10,17 +10,21 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
modules := \
async.js \
log4moz.js \
observers.js \
preferences.js \
rest.js \
storageservice.js \
stringbundle.js \
tokenserverclient.js \
utils.js \
$(NULL)
pp_modules := \
async.js \
bagheeraclient.js \
observers.js \
rest.js \
$(NULL)
testing_modules := \
aitcserver.js \
bagheeraserver.js \
@ -44,7 +48,7 @@ INSTALL_TARGETS += MODULES
TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
TESTING_JS_MODULE_DIR := services-common
PP_JS_MODULES := bagheeraclient.js
PP_JS_MODULES := $(pp_modules)
PP_JS_MODULES_PATH = $(FINAL_TARGET)/modules/services-common
PP_TARGETS += PP_JS_MODULES

View File

@ -2,10 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MERGED_COMPARTMENT
this.EXPORTED_SYMBOLS = ["Async"];
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
#endif
// Constants for makeSyncCallback, waitForSyncCallback.
const CB_READY = {};
const CB_COMPLETE = {};

View File

@ -20,11 +20,11 @@ this.EXPORTED_SYMBOLS = [
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://services-common/rest.js");
#endif
Cu.import("resource://gre/modules/commonjs/promise/core.js");
Cu.import("resource://services-common/log4moz.js");
Cu.import("resource://services-common/rest.js");
Cu.import("resource://services-common/utils.js");

View File

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MERGED_COMPARTMENT
this.EXPORTED_SYMBOLS = ["Observers"];
const Cc = Components.classes;
@ -9,6 +11,8 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
#endif
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
/**

View File

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MERGED_COMPARTMENT
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
this.EXPORTED_SYMBOLS = [
@ -10,13 +12,17 @@ this.EXPORTED_SYMBOLS = [
"TokenAuthenticatedRESTRequest"
];
#endif
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://services-crypto/utils.js");
Cu.import("resource://services-common/log4moz.js");
Cu.import("resource://services-common/preferences.js");
Cu.import("resource://services-common/utils.js");
XPCOMUtils.defineLazyModuleGetter(this, "CryptoUtils",
"resource://services-crypto/utils.js");
const Prefs = new Preferences("services.common.rest.");
/**

View File

@ -7,7 +7,6 @@
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://services-common/observers.js");
Cu.import("resource://services-common/preferences.js");
Cu.import("resource://services-common/utils.js");
@ -257,6 +256,8 @@ this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DataReportingService]);
#define MERGED_COMPARTMENT
#include ../common/observers.js
;
#include policy.jsm
;
#include sessions.jsm

View File

@ -24,6 +24,8 @@ const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
// issue.
#define MERGED_COMPARTMENT
#include ../common/async.js
;
#include ../common/bagheeraclient.js
;
#include ../metrics/Metrics.jsm

View File

@ -14,9 +14,9 @@ const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
Cu.import("resource://gre/modules/Metrics.jsm");
Cu.import("resource://services-common/bagheeraclient.js");
Cu.import("resource://services-common/async.js");
#endif
Cu.import("resource://services-common/async.js");
Cu.import("resource://services-common/log4moz.js");
Cu.import("resource://services-common/preferences.js");
Cu.import("resource://services-common/utils.js");