gecko-dev/xpcom/base
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
..
AppShutdown.cpp Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers 2021-03-17 08:07:48 +00:00
AppShutdown.h Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers 2021-03-17 08:07:48 +00:00
AutoRestore.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-08-02 15:29:15 +00:00
AvailableMemoryTracker.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-05-25 07:42:38 +00:00
AvailableMemoryTracker.h
ClearOnShutdown.cpp Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers 2021-03-17 08:07:48 +00:00
ClearOnShutdown.h Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers 2021-03-17 08:07:48 +00:00
CodeAddressService.h Bug 1699375 - Make MozFormatCodeAddress* return the printed size, and use that instead of strlen. r=nika 2021-03-22 21:25:30 +00:00
CountingAllocatorBase.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
CycleCollectedJSContext.cpp Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika 2021-02-26 09:11:46 +00:00
CycleCollectedJSContext.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
CycleCollectedJSRuntime.cpp Bug 708901 - Migrate to nsTHashSet in xpcom. r=xpcom-reviewers,kmag 2021-03-23 10:36:39 +00:00
CycleCollectedJSRuntime.h Bug 708901 - Migrate to nsTHashSet in xpcom. r=xpcom-reviewers,kmag 2021-03-23 10:36:39 +00:00
Debug.cpp
Debug.h
DebuggerOnGCRunnable.cpp Bug 1627392 - Add missing includes and namespaces to xpcom/base. r=xpcom-reviewers,sg 2020-04-08 10:12:33 +00:00
DebuggerOnGCRunnable.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
DeferredFinalize.cpp Bug 1573938 - Never collect wrapper JSObjects when recording/replaying, r=mccr8. 2019-08-16 20:51:12 +00:00
DeferredFinalize.h Bug 1692403 - Never inline DeferredFinalize(nsISupports*). r=xpcom-reviewers,mccr8 2021-03-15 16:44:23 +00:00
EnumeratedArrayCycleCollection.h
ErrorList.py Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco 2021-03-23 11:15:11 +00:00
ErrorNames.cpp Bug 1265030 - Show symbolic nsresult name in NS_ENSURE_SUCCESS warning. r=mccr8 2020-04-13 23:39:19 +00:00
ErrorNames.h Bug 1265030 - Show symbolic nsresult name in NS_ENSURE_SUCCESS warning. r=mccr8 2020-04-13 23:39:19 +00:00
GkRustUtils.cpp Bug 1662518 part 1 - Add semver to gkrust_util r=emilio 2020-09-02 23:49:02 +00:00
GkRustUtils.h Bug 1662518 part 1 - Add semver to gkrust_util r=emilio 2020-09-02 23:49:02 +00:00
HoldDropJSObjects.cpp Bug 1425450 - Pass zone information through when preserving wrappers r=mccr8 2020-04-20 17:07:58 +00:00
HoldDropJSObjects.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
IntentionalCrash.h Bug 1598173 - Make NoteIntentionalCrash() work in the main process. r=froydnj 2019-11-25 21:42:04 +00:00
JSObjectHolder.cpp
JSObjectHolder.h Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika 2020-04-07 15:16:23 +00:00
LogCommandLineHandler.cpp Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
LogCommandLineHandler.h
LogModulePrefWatcher.cpp Bug 1627392 - Add missing includes and namespaces to xpcom/base. r=xpcom-reviewers,sg 2020-04-08 10:12:33 +00:00
LogModulePrefWatcher.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
Logging.cpp Bug 1694530 - Allow to prepend a distinct header by using MOZ_LOG=prependheader. r=xpcom-reviewers,nika 2021-03-13 00:18:47 +00:00
Logging.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
MacHelpers.h
MacHelpers.mm Bug 1692391 - Replace the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NSRESULT macros with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE). r=haik 2021-02-16 22:55:20 +00:00
MacStringHelpers.h
MacStringHelpers.mm Bug 1692391 - Replace the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NSRESULT macros with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE). r=haik 2021-02-16 22:55:20 +00:00
MemoryInfo.cpp Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
MemoryInfo.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
MemoryMapping.cpp Bug 1652813 - Provide an API to get the resident unique memory of a process without waking it up;r=njn 2020-08-20 13:57:40 +00:00
MemoryMapping.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
MemoryReportingProcess.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
MemoryTelemetry.cpp Bug 1689182 - Collect content memory telemetry from the parent process, r=kmag 2021-01-28 19:48:03 +00:00
MemoryTelemetry.h Bug 1689182 - Collect content memory telemetry from the parent process, r=kmag 2021-01-28 19:48:03 +00:00
NSPRLogModulesParser.cpp Bug 1636888 - Allow specifying entire rust modules in MOZ_LOG r=froydnj 2020-06-10 07:18:40 +00:00
NSPRLogModulesParser.h
OwningNonNull.h Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj 2020-03-20 17:13:51 +00:00
ShutdownPhase.h Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten 2021-02-27 14:38:14 +00:00
SizeOfState.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
StaticLocalPtr.h Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika' 2020-04-29 17:28:06 +00:00
StaticMonitor.h Bug 1599614 - followup: Unbust mac build. CLOSED TREE 2019-11-27 15:19:45 +01:00
StaticMutex.h Bug 1618186 - Remove AnyStaticMutex. r=froydnj 2020-02-28 14:24:21 +00:00
StaticPtr.h Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika' 2020-04-29 17:28:06 +00:00
TupleCycleCollection.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
components.conf
moz.build Bug 1692391 - Clean up nsObjCExceptions.h a little bit, and use -[NSException callStackSymbols] instead of manual symbolication. r=haik 2021-02-16 22:55:18 +00:00
nsAlgorithm.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsAutoRef.h Bug 1665373 - Remove nsCountedRef. r=xpcom-reviewers,nika 2020-09-17 00:50:56 +00:00
nsCOMPtr.cpp Bug 1661242 - Declare nsCOMPtr_base::begin_assignment MOZ_ALWAYS_INLINE in release builds. r=froydnj 2020-09-03 14:45:09 +00:00
nsCOMPtr.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsCRTGlue.cpp Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium 2021-03-16 20:45:21 +00:00
nsCRTGlue.h
nsClassInfoImpl.cpp
nsCom.h
nsConsoleMessage.cpp Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku. 2021-03-10 12:44:22 +00:00
nsConsoleMessage.h Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku. 2021-03-10 12:44:22 +00:00
nsConsoleService.cpp Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in xpcom. r=xpcom-reviewers,nika 2021-03-01 09:59:33 +00:00
nsConsoleService.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsCrashOnException.cpp
nsCrashOnException.h
nsCycleCollectionNoteChild.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
nsCycleCollectionNoteRootCallback.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsCycleCollectionParticipant.cpp
nsCycleCollectionParticipant.h Bug 1696507 - Remove support for NO_UNLINK version of cycle collector macros. r=smaug 2021-03-10 19:50:40 +00:00
nsCycleCollectionTraversalCallback.h Bug 1676363 - Remove unnecessary includes from xpcom/base/nsCycleCollectionTraversalCallback.h. r=#xpcom-reviewers 2020-11-23 16:09:59 +00:00
nsCycleCollector.cpp Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian 2021-02-16 04:44:19 +00:00
nsCycleCollector.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsCycleCollectorTraceJSHelpers.cpp Bug 1428742 - use Value::toGCCellPtr and delegating ctr of GCCellPtr. r=jonco 2021-02-03 20:13:10 +00:00
nsDebug.h Bug 1666802 - Remove LayersLogging.*. r=mattwoodrow 2020-10-11 21:20:46 +00:00
nsDebugImpl.cpp Bug 1699375 - Move WalkTheStack to mozglue. r=nika 2021-03-22 21:25:30 +00:00
nsDebugImpl.h
nsDumpUtils.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
nsDumpUtils.h Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
nsError.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsErrorService.cpp Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika 2021-02-26 09:11:46 +00:00
nsErrorService.h
nsGZFileWriter.cpp
nsGZFileWriter.h 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
nsIClassInfoImpl.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana 2020-10-06 16:12:00 +00:00
nsIConsoleListener.idl
nsIConsoleMessage.idl Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku. 2021-03-10 12:44:22 +00:00
nsIConsoleService.idl
nsICycleCollectorListener.idl Bug 1621359 - Update .idl files to work with ply3 r=mccr8 2020-04-14 17:17:38 +00:00
nsID.cpp
nsID.h Backed out changeset adcfa8af679c (bug 1631533) for causing test_useractivation_transient.html failures CLOSED TREE 2020-04-20 23:09:32 +03:00
nsIDebug2.idl (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh 2020-06-27 19:15:17 +00:00
nsIErrorService.idl
nsIException.idl
nsIGZFileWriter.idl Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj 2020-09-14 02:33:20 +00:00
nsIInterfaceRequestor.idl
nsIInterfaceRequestorUtils.cpp
nsIInterfaceRequestorUtils.h
nsIMacPreferencesReader.idl
nsIMacUtils.idl
nsIMemory.idl
nsIMemoryInfoDumper.idl Bug 1653671 - Add aMinimizeMemoryUsage argument to dumpMemoryReportsToNamedFile(). r=froydnj 2020-08-21 17:11:03 +00:00
nsIMemoryReporter.idl Bug 1673432 - Add comment about minimizeMemoryUsage being async. r=kmag DONTBUILD 2020-11-03 21:54:46 +00:00
nsIMessageLoop.idl
nsINIParser.cpp Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag 2021-03-17 15:49:46 +00:00
nsINIParser.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsISecurityConsoleMessage.idl
nsISizeOf.h
nsISupports.idl
nsISupportsBase.h
nsISupportsImpl.cpp Bug 1678463 - Part 1: Add _WITH_DELETE_ON_EVENT_TARGET macros to nsISupportsImpl, r=mccr8 2020-12-14 18:30:51 +00:00
nsISupportsImpl.h Bug 1678463 - Part 1: Add _WITH_DELETE_ON_EVENT_TARGET macros to nsISupportsImpl, r=mccr8 2020-12-14 18:30:51 +00:00
nsISupportsUtils.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
nsIUUIDGenerator.idl
nsIVersionComparator.idl
nsIWeakReference.idl
nsIWeakReferenceUtils.h
nsInterfaceRequestorAgg.cpp Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
nsInterfaceRequestorAgg.h
nsMacPreferencesReader.h
nsMacPreferencesReader.mm Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
nsMacUtilsImpl.cpp Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
nsMacUtilsImpl.h Bug 1677029 - With universal builds on Apple Silicon, first launch of the GMP process is slow r=bryce,spohl 2020-11-16 22:34:31 +00:00
nsMaybeWeakPtr.h Bug 1626570 - Improve handling of copying arrays in xpcom/. r=froydnj 2020-05-05 11:27:18 +00:00
nsMemory.cpp
nsMemory.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsMemoryImpl.cpp No bug - Fixup a comment in nsMemoryImpl. 2019-11-27 22:06:46 +00:00
nsMemoryImpl.h Bug 1599614 - nsMemoryImpl::RunFlushers is infallible. r=njn 2019-11-27 13:46:12 +00:00
nsMemoryInfoDumper.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
nsMemoryInfoDumper.h
nsMemoryReporterManager.cpp Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag 2021-03-17 15:49:46 +00:00
nsMemoryReporterManager.h Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin 2021-03-10 10:47:47 +00:00
nsMessageLoop.cpp Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp 2020-07-23 14:51:46 +00:00
nsMessageLoop.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsObjCExceptions.h Bug 1694000 - Ignore "Missing Touches." exception when it bubbles up to the event loop. r=spohl 2021-02-20 22:11:34 +00:00
nsObjCExceptions.mm Bug 1694000 - Ignore "Missing Touches." exception when it bubbles up to the event loop. r=spohl 2021-02-20 22:11:34 +00:00
nsQueryObject.h Bug 1632099 - P1. Have nsQueryObject accept const smart pointers. r=froydnj 2020-06-22 14:42:16 +00:00
nsSecurityConsoleMessage.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsSecurityConsoleMessage.h
nsSystemInfo.cpp Bug 1683373: Add hasUserCET flag to cpu.extensions in Telemetry Environment. r=dmajor 2020-12-19 19:48:29 +00:00
nsSystemInfo.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsTraceRefcnt.cpp Bug 1699375 - Move WalkTheStack to mozglue. r=nika 2021-03-22 21:25:30 +00:00
nsTraceRefcnt.h Bug 1699375 - Move WalkTheStack to mozglue. r=nika 2021-03-22 21:25:30 +00:00
nsUUIDGenerator.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsUUIDGenerator.h
nsVersionComparator.cpp
nsVersionComparator.h Bug 1651136 - Part 1: Allow (and mark) certain xpcom/ headers as non-XPCOM. r=froydnj,bytesized 2020-07-08 22:57:26 +00:00
nsVersionComparatorImpl.cpp
nsVersionComparatorImpl.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsWeakReference.cpp
nsWeakReference.h Bug 1535617: Part 1 - Add macros to clear weak references on unlink. r=mccr8 2020-02-25 19:44:27 +00:00
nsWindowsHelpers.h Bug 1652561 - Refactor nsLookAndFeel::GetFontImpl() to prepare for remoting r=jmathies 2020-07-31 17:32:57 +00:00
nscore.h Bug 1688768 - Enable full shutdown when JS_STRUCTURED_SPEW is enabled. r=sfink 2021-01-27 23:40:35 +00:00
nsrootidl.idl Bug 1657706 - Forward-declare JSContext in nsrootidl.idl. r=nika 2020-08-07 16:45:16 +00:00