Bug 1377999 - Enable default new operator back for Document node r=smaug

Document is a special case. Since Documents could own NodeInfoManager,
use the global new operator for Documents

Differential Revision: https://phabricator.services.mozilla.com/D62351

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sean Feng 2020-03-17 14:52:55 +00:00
parent 33c417a9d0
commit e8079ed162

View File

@ -489,6 +489,10 @@ class Document : public nsINode,
typedef dom::ExternalResourceMap::ExternalResourceLoad ExternalResourceLoad;
typedef dom::ReferrerPolicy ReferrerPolicyEnum;
// nsINode overrides the new operator for DOM Arena allocation.
// to use the default one, we need to bring it back again
void* operator new(size_t aSize) { return ::operator new(aSize); }
/**
* Called when XPCOM shutdown.
*/