Bug 1432901 - Part 12: Break cycles manually during shutdown r=yulia
Since mozJSComponentLoader is destroyed after the cycle collector, we need to break cycles manually before the final cycle collection otherwise we get a memory leak. Unload() is called at an appropriate earlier point in shutdown. Differential Revision: https://phabricator.services.mozilla.com/D145567
This commit is contained in:
@@ -180,6 +180,9 @@ class ModuleLoaderBase : public nsISupports {
|
||||
nsISerialEventTarget* aEventTarget =
|
||||
mozilla::GetMainThreadSerialEventTarget());
|
||||
|
||||
// Called to break cycles during shutdown to prevent memory leaks.
|
||||
void Shutdown();
|
||||
|
||||
using LoadedScript = JS::loader::LoadedScript;
|
||||
using ScriptFetchOptions = JS::loader::ScriptFetchOptions;
|
||||
using ScriptLoadRequest = JS::loader::ScriptLoadRequest;
|
||||
|
||||
Reference in New Issue
Block a user