mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix crash with ObjectStructureWithMap and inline cache
If inline cache refers ObjectStructure, ObjectStructure should keep its contents. Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
74735f9029
commit
87fda52727
4 changed files with 73 additions and 23 deletions
|
|
@ -2410,6 +2410,7 @@ NEVER_INLINE void InterpreterSlowPath::getObjectPrecomputedCaseOperation(Executi
|
|||
|
||||
while (true) {
|
||||
auto s = obj->structure();
|
||||
s->markReferencedByInlineCache();
|
||||
cachedhiddenClassChain.push_back(s);
|
||||
auto result = s->findProperty(propertyName);
|
||||
|
||||
|
|
@ -4139,6 +4140,8 @@ NEVER_INLINE void InterpreterSlowPath::objectDefineOwnPropertyWithNameOperation(
|
|||
byteCodeBlock->m_otherLiteralData.push_back(newStructure);
|
||||
code->m_inlineCachedStructureBefore = oldStructure;
|
||||
code->m_inlineCachedStructureAfter = newStructure;
|
||||
oldStructure->markReferencedByInlineCache();
|
||||
newStructure->markReferencedByInlineCache();
|
||||
} else {
|
||||
// failed to cache
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue