gecko-dev/xpcom/base
Jon Coppeard b975de8947 Bug 1648453 - Use CallbackObject to trigger cleanup while setting up the incumbent global r=smaug
This also factors out FinalizationRegistry support into a separate class.

The JS engine now passes a callback function and the incumbent global which are recorded in QueueCallback. FinalizationRegistryCleanup::DoCleanup creates a CallbackObject can calls it immediately (I originally tried creating it in QueueCallback but there were problems because this is called during GC).

I coped most of this from the way promise reaction jobs work. I added FinalizationRegistryCleanupCallback; I don't know if that's overkill.

Differential Revision: https://phabricator.services.mozilla.com/D83614
2020-07-17 17:34:46 +00:00
..
AppShutdown.cpp Bug 1627075 - OMT and OMP StartupCache access r=froydnj 2020-07-08 02:46:11 +00:00
AppShutdown.h Bug 1615921 - Skip writing to pdf file if shutting down r=jwatt 2020-02-24 17:54:09 +00:00
AutoRestore.h
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 1637890 - P1. Process ClearOnShutdown listeners in LIFO order. r=froydnj 2020-05-16 07:10:11 +00:00
ClearOnShutdown.h Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika' 2020-04-29 17:28:06 +00:00
CodeAddressService.h Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald 2019-08-23 05:45:16 +00:00
CountingAllocatorBase.h Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
CycleCollectedJSContext.cpp Bug 1648453 - Use CallbackObject to trigger cleanup while setting up the incumbent global r=smaug 2020-07-17 17:34:46 +00:00
CycleCollectedJSContext.h Bug 1648453 - Use CallbackObject to trigger cleanup while setting up the incumbent global r=smaug 2020-07-17 17:34:46 +00:00
CycleCollectedJSRuntime.cpp Bug 1626322 - Add an API to get the zone of a possibly-nursery allocated GC thing and use it in CheckZoneTracer r=sfink,mccr8 2020-04-28 22:26:59 +00:00
CycleCollectedJSRuntime.h Bug 1425450 - Only trace JS holders in collecting zones r=mccr8 2020-04-20 17:08:54 +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 1627392 - Add missing includes and namespaces to xpcom/base. r=xpcom-reviewers,sg 2020-04-08 10:12:33 +00:00
EnumeratedArrayCycleCollection.h
ErrorList.py Bug 1646543 - Replace blacklist with more appropriate names. r=xpcom-reviewers,nika 2020-06-17 23:55:46 +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 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj 2019-02-25 16:14:01 -06:00
GkRustUtils.h Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs 2019-07-08 09:27:47 +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 1425450 - Pass zone information through when preserving wrappers r=mccr8 2020-04-20 17:07:58 +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 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +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 1624090 - Make it possible to forward rust logging into the Gecko logger r=froydnj 2020-05-09 11:24:33 +00:00
Logging.h Bug 1624090 - Make it possible to forward rust logging into the Gecko logger r=froydnj 2020-05-09 11:24:33 +00:00
MacHelpers.h
MacHelpers.mm
MacStringHelpers.h
MacStringHelpers.mm Bug 1607816 - Replace mozilla::{Max, Min}Value with std::numeric_limits. r=froydnj 2020-01-08 16:30:40 +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
MemoryMapping.cpp
MemoryMapping.h
MemoryReportingProcess.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
MemoryTelemetry.cpp Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika 2020-04-07 15:17:07 +00:00
MemoryTelemetry.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +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 1606880 - Implement fast shutdown prefs r=froydnj 2020-01-29 12:29:43 +00:00
SizeOfState.h
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
components.conf Bug 1539029 - pt 1 - give RDD its own process selector. r=froydnj 2019-04-09 21:13:16 +00:00
moz.build Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium 2020-06-26 10:41:26 +00:00
nsAlgorithm.h
nsAutoRef.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
nsCOMPtr.cpp
nsCOMPtr.h Bug 1637605 - Add support for polymorphic return values to ToResultInvoke. r=froydnj 2020-05-19 09:07:08 +00:00
nsCRTGlue.cpp Bug 1615921 - Suspend late write checks in Windows vprintf_stderr r=froydnj 2020-02-21 18:51:37 +00:00
nsCRTGlue.h Bug 1453456 - Remove nsCRT::IsAscii(null-terminated string) in favor of mozilla::IsAsciiNullTerminated. r=froydnj 2019-02-25 12:22:24 -08:00
nsClassInfoImpl.cpp Bug 1526382 - Part 2: Make nsIClassInfo use Array<nsIIDRef> for 'interfaces', r=mccr8 2019-02-13 21:42:08 +00:00
nsCom.h
nsConsoleMessage.cpp
nsConsoleMessage.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsConsoleService.cpp Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski 2020-05-27 00:28:59 +00:00
nsConsoleService.h Bug 1577767 - Call maybeForwardScriptError independently of parent process listeners state. r=baku 2019-09-04 09:44:50 +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
nsCycleCollectionParticipant.cpp
nsCycleCollectionParticipant.h Bug 1624810 - Add a nsCycleCollectionParticipant flag for JS holders that can have GC things in multiple zones r=mccr8 2020-03-26 10:48:30 +00:00
nsCycleCollectionTraversalCallback.h
nsCycleCollector.cpp Bug 1651612 - Run extra garbage collection cycle for idle workers if cycle collection collected anything r=mccr8 2020-07-10 13:55:38 +00:00
nsCycleCollector.h Bug 1651612 - Run extra garbage collection cycle for idle workers if cycle collection collected anything r=mccr8 2020-07-10 13:55:38 +00:00
nsCycleCollectorTraceJSHelpers.cpp Bug 1633145 - Replace JSID_IS_GCTHING. r=arai 2020-04-26 17:03:01 +00:00
nsDebug.h Bug 1265030 - Show symbolic nsresult name in NS_ENSURE_SUCCESS warning. r=mccr8 2020-04-13 23:39:19 +00:00
nsDebugImpl.cpp (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh 2020-06-27 19:15:17 +00:00
nsDebugImpl.h
nsDumpUtils.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsDumpUtils.h
nsError.h
nsErrorService.cpp Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag 2020-01-07 00:06:01 +00:00
nsErrorService.h
nsGZFileWriter.cpp
nsGZFileWriter.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsIClassInfoImpl.h Bug 1526382 - Part 2: Make nsIClassInfo use Array<nsIIDRef> for 'interfaces', r=mccr8 2019-02-13 21:42:08 +00:00
nsIConsoleListener.idl
nsIConsoleMessage.idl
nsIConsoleService.idl Bug 1558653. Stop using [array] in nsIConsoleService. r=froydnj 2019-06-12 18:10:19 +00:00
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 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIException.idl
nsIGZFileWriter.idl Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsIInterfaceRequestor.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIInterfaceRequestorUtils.cpp
nsIInterfaceRequestorUtils.h
nsIMacPreferencesReader.idl
nsIMacUtils.idl
nsIMemory.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIMemoryInfoDumper.idl
nsIMemoryReporter.idl Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsIMessageLoop.idl
nsINIParser.cpp Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj 2020-01-13 19:18:56 +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 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsISupportsBase.h
nsISupportsImpl.cpp Backed out 5 changesets (bug 1650996, bug 1649974) for perma failures on Android 7.0. CLOSED TREE 2020-07-09 10:33:45 +03:00
nsISupportsImpl.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-07-04 09:38:43 +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 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
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 1512991 - Add JsonWriteFunc::Write to take string length. r=botond 2020-05-08 16:24:31 +00:00
nsMacUtilsImpl.cpp Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
nsMacUtilsImpl.h Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce 2019-06-14 22:55:27 +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
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 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsMemoryInfoDumper.h
nsMemoryReporterManager.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsMemoryReporterManager.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsMessageLoop.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +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 1595828 - Fix some include guards. r=froydnj 2019-11-12 17:27:20 +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 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
nsSystemInfo.h Bug 1625553, change cpuCount value to int to avoid incorrect telemetry r=mconley 2020-04-09 19:33:13 +00:00
nsTraceRefcnt.cpp Bug 1627392 - Add missing includes and namespaces to xpcom/base. r=xpcom-reviewers,sg 2020-04-08 10:12:33 +00:00
nsTraceRefcnt.h Bug 1604084 - Fix log names of leak checking and refactor it. r=gsvelto 2019-12-18 17:02:10 +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 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-07-06 08:18:28 +00:00
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 1651136 - Part 1: Allow (and mark) certain xpcom/ headers as non-XPCOM. r=froydnj,bytesized 2020-07-08 22:57:26 +00:00
nscore.h Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium 2019-09-04 02:40:32 +00:00
nsrootidl.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00