Bug 1535913 - Part 3: Mark nsWrapperCache as JS_HAZ_ROOTED, r=sfink,peterv

This was recommended by sfink as a solution to the issue where the custom
deleter UniquePtr added by earlier parts of this patch caused rooting failures
when the hazard analysis identified it as needing rooting due to containing a
manually managed unrooted `JSObject*`.

Differential Revision: https://phabricator.services.mozilla.com/D115705
This commit is contained in:
Nika Layzell 2021-05-26 15:25:44 +00:00
parent be34a472af
commit b28db76c2a

View File

@ -85,7 +85,7 @@ static_assert(sizeof(void*) == 4, "Only support 32-bit and 64-bit");
* codebase. Include nsWrapperCacheInlines.h if you need to call those methods.
*/
class nsWrapperCache {
class JS_HAZ_ROOTED nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_WRAPPERCACHE_IID)