This patch adds a preference jsloader.shareGlobal that makes it so that JSMs share a single global, in order to reduce memory usage. The pref is disabled by default, and will be enabled in a later bug. Each JSM gets its own NonSyntacticVariablesObject (NSVO), which is used for top level variable bindings and as the value of |this| within the JSM. For the module loader, the main change is setting up the shared global, and the NSVO for each JSM. A number of files are blacklisted from the shared global, because they do things to the global that would interfer with other JSMs. This is detailed in mozJSComponentLoader::ReuseGlobal(). MozReview-Commit-ID: 3qVAc1c5aMI
2.1 KiB
2.1 KiB