Summary: | [ftlopt] StructureSet::onlyStructure() should return nullptr if it's not a singleton (instead of asserting) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||
Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | ahmad.saleem792, ashvayka, barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam, ysuzuki | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Filip Pizlo
2014-06-19 14:43:17 PDT
Created attachment 233385 [details]
the patch
This function is following: https://searchfox.org/wubkat/rev/dc6a01c9fd207e1b1394a1cb8261b410a1909cf6/Source/JavaScriptCore/bytecode/StructureSet.h#52 Structure* onlyStructure() const { return onlyEntry(); } While onlyEntry is: // Returns the only entry if the array has exactly one entry. T onlyEntry() const { if (isThin()) return singleEntry(); OutOfLineList* list = this->list(); if (list->m_length != 1) return T(); return list->list()[0]; } __ Which is similar to proposed patch, so I think it is fixed. Marking this as 'RESOLVED CONFIGURATION CHANGED' and CCing - Alexey and Yusuke. |