Bug 1891023 - Clear CallbackObject's JS references when refcnt drops to 0, r=mccr8

See also https://searchfox.org/mozilla-central/rev/058ab60e5020d7c5c98cf82d298aa84626e0cd79/xpcom/base/CycleCollectedJSContext.cpp#213-218 for another similar-ish Reset() call.

Differential Revision: https://phabricator.services.mozilla.com/D207273
This commit is contained in:
Olli Pettay 2024-04-11 21:43:47 +00:00
Родитель 1f746f22fd
Коммит 657e7dfb94
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -29,7 +29,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CallbackObject)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(CallbackObject)
NS_IMPL_CYCLE_COLLECTING_RELEASE(CallbackObject)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(CallbackObject, Reset())
NS_IMPL_CYCLE_COLLECTION_CLASS(CallbackObject)