Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
We should only append ParserArenaDeletable pointers to ParserArena::m…
…_deletableObjects. https://bugs.webkit.org/show_bug.cgi?id=182180 <rdar://problem/36460697> Reviewed by Michael Saboff. Some parser Node subclasses extend ParserArenaDeletable via multiple inheritance, but not as the Node's first base class. ParserArena::m_deletableObjects is expecting pointers to objects of the shape of ParserArenaDeletable. We ensure this by allocating the Node subclass, and casting it to ParserArenaDeletable to get the correct pointer to append to ParserArena::m_deletableObjects. To simplify things, we introduce a JSC_MAKE_PARSER_ARENA_DELETABLE_ALLOCATED (analogous to WTF_MAKE_FAST_ALLOCATED) for use in Node subclasses that extends ParserArenaDeletable. * parser/NodeConstructors.h: (JSC::ParserArenaDeletable::operator new): * parser/Nodes.h: * parser/ParserArena.h: (JSC::ParserArena::allocateDeletable): Canonical link: https://commits.webkit.org/198006@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Mark Lam
committed
Jan 26, 2018
1 parent
beb0471
commit d9bd58c
Showing
4 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters