Issue #2678 - Stop using EnsureExpandoObject in codegen code when we just want to preserver the wrapper for a DOM proxy.

This commit is contained in:
Moonchild 2025-01-16 22:54:23 +01:00 committed by roytam1
commit c9c941f321
6 changed files with 29 additions and 14 deletions

View file

@ -85,9 +85,16 @@ public:
}
return obj;
}
void PreserveWrapper(nsISupports* aScriptObjectHolder)
{
PreserveWrapperInternal(aScriptObjectHolder);
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) = 0;
protected:
// Hook for calling nsWrapperCache::GetWrapperPreserveColor.
virtual JSObject* GetWrapperPreserveColorInternal() = 0;
// Hook for calling nsWrapperCache::PreserveWrapper.
virtual void PreserveWrapperInternal(nsISupports* aScriptObjectHolder) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLCollection, NS_IHTMLCOLLECTION_IID)