gecko-dev/js/xpconnect
Tom Schuster 01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
..
crashtests
idl Bug 1697900 - Remove unused NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT. r=mccr8 2021-03-12 10:57:15 +00:00
loader Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag 2021-03-17 15:49:46 +00:00
public Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp 2020-11-18 09:05:59 +00:00
shell Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
src Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco 2021-03-23 11:15:11 +00:00
tests Bug 1519483: Add hasIndices to RegExpFlags r=mgaudet 2021-03-10 22:10:14 +00:00
wrappers Bug 1674777 part 10 - Fix XPConnect callers for JS_GetTypedArrayLength returning size_t. r=kmag 2021-02-10 11:22:59 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00