Bug 1806872 - Correct QueryInterface implementation of ScriptLoadRequest and LoadContextBase. r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D165313
This commit is contained in:
Peter Van der Beken 2022-12-21 18:09:35 +00:00
parent 8d1ecb7441
commit a20a1d18eb
2 changed files with 4 additions and 11 deletions

View File

@ -17,23 +17,15 @@ namespace JS::loader {
////////////////////////////////////////////////////////////////
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(LoadContextBase)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(LoadContextBase)
NS_IMPL_CYCLE_COLLECTING_RELEASE(LoadContextBase)
NS_IMPL_CYCLE_COLLECTION_CLASS(LoadContextBase)
NS_IMPL_CYCLE_COLLECTION(LoadContextBase, mRequest)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(LoadContextBase)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mRequest)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(LoadContextBase)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRequest)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
LoadContextBase::LoadContextBase(ContextKind kind)
: mKind(kind), mRequest(nullptr) {}
LoadContextBase::LoadContextBase(ContextKind kind) : mKind(kind) {}
void LoadContextBase::SetRequest(ScriptLoadRequest* aRequest) {
MOZ_ASSERT(!mRequest);

View File

@ -50,6 +50,7 @@ ScriptFetchOptions::~ScriptFetchOptions() = default;
//////////////////////////////////////////////////////////////
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ScriptLoadRequest)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(ScriptLoadRequest)