gecko-dev/browser
Rob Wu 459ac122eb Bug 1287010 - Use minimal global scope for ext-*.js scripts r=billm
Currently there is a tight coupling between registered APIs because they
share the same global scope, and the dependencies between the modules
that use these globals are not explicit. Consequently, it would be
possible for APIs to break when the registered APIs run in separate
processes, because then there are separate global scopes.
To mitigate this issue, this patch isolates the global namespaces of
API registrations in different environments, starting with the "chrome"
process. Content and addon processes will follow later.

A new JSM is introduced to avoid hidden dependencies between ext-*.js
and the script loader. ExtensionUtils.jsm would be a natural choice for
this shared utility method, but cannot be used because its local
`EventEmitter` implementation conflicts with the `EventEmitter` import
in ext-tabs.js.

So, this patch provides isolation of global variables declared through
`globals.XXX = ...`, but does not provide isolation for `Cu.import`-ed
logic. Ideally `Cu.import` should always use its second argument to
prevent inadvertent namespace pollution.

MozReview-Commit-ID: 1DTZaKOaeSE

--HG--
extra : rebase_source : 1376a1325fd9bf186e09e1dbe83467f3ad94516f
2016-08-17 20:28:19 -07:00
..
app Bug 1297479 - create a pref to turn off UI to undo automatic migration for use by funnelcake builds, r=Dolske 2016-08-23 19:30:32 +01:00
base Merge fx-team to m-c. a=merge 2016-08-25 08:12:26 -04:00
branding Bug 1283909 - Replaces start menu tile images with larger versions to provide better resoultion on HiDPI screens. r=jaws 2016-08-16 10:04:53 -04:00
components Bug 1287010 - Use minimal global scope for ext-*.js scripts r=billm 2016-08-17 20:28:19 -07:00
config Bug 1294585 - Remove --with-google-oauth-api-keyfile from mozconfigs. r=mikedeboer 2016-08-16 08:32:48 +09:00
docs Bug 1277810 - Part 1 - Restructure Telemetry client documentation. r=dexter, f=chutten 2016-08-09 13:52:27 +02:00
experiments Bug 1294811: Fix external tests that import head_addons.js. r=rhelmer 2016-08-16 17:02:44 -07:00
extensions Bug 1289549 P5 socialapi fix path in pocket bootstrap, r=florian 2016-08-23 15:24:07 -07:00
fonts Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
installer Bug 1276701 - Follow-up to update package-manifest.in after removing the Safari migrator on Windows. r=bustage on a CLOSED TREE 2016-08-23 16:29:02 -07:00
locales Merge inbound to m-c. a=merge 2016-08-25 08:10:52 -04:00
modules Bug 1289549 P3 socialapi move toolkit component to browser, r=florian 2016-08-23 15:24:07 -07:00
themes Merge fx-team to m-c. a=merge 2016-08-25 08:12:26 -04:00
tools/mozscreenshots Bug 1295488 - Don't use a directory for mozscreenshots localFile tests. r=MattN 2016-08-17 08:54:33 +02:00
.eslintrc
app-rules.mk
app.mozbuild
build.mk Bug 1293295 - Replace all mochitest 'flavor' options with a single --flavor argument, r=jmaher 2016-08-08 11:48:49 -04:00
confvars.sh Bug 1252570 - Remove mozPay. r=ehsan,mfinkle,fabrice 2016-08-22 10:42:22 +02:00
defs.mk
LICENSE
Makefile.in
moz.build Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium 2016-08-17 15:02:31 -07:00
moz.configure Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00