mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843231 - Move the nulling out of mPrototypeNoHelper from SetGlobal to RemoveWrappedNativeProtos. r=bz
The only call-site for both of these is JSD->nsXPConnect::InitClasses, so this is equivalent. All this will go away soon anyhow when JSD goes away.
This commit is contained in:
parent
7901100c08
commit
0352ac2f47
@ -294,9 +294,6 @@ XPCWrappedNativeScope::SetGlobal(JSContext *cx, JSObject* aGlobal)
|
||||
// nsXPConnect::InitClassesWithNewWrappedGlobal.
|
||||
mGlobalJSObject = aGlobal;
|
||||
|
||||
// Clear the no helper wrapper prototype object so that a new one
|
||||
// gets created if needed.
|
||||
mPrototypeNoHelper = nullptr;
|
||||
}
|
||||
|
||||
XPCWrappedNativeScope::~XPCWrappedNativeScope()
|
||||
@ -729,6 +726,10 @@ WNProtoRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||
void
|
||||
XPCWrappedNativeScope::RemoveWrappedNativeProtos()
|
||||
{
|
||||
// Clear the no helper wrapper prototype object so that a new one
|
||||
// gets created if needed.
|
||||
mPrototypeNoHelper = nullptr;
|
||||
|
||||
XPCAutoLock al(XPCJSRuntime::Get()->GetMapLock());
|
||||
|
||||
mWrappedNativeProtoMap->Enumerate(WNProtoRemover,
|
||||
|
Loading…
Reference in New Issue
Block a user