Changeset 36106 in webkit for trunk/JavaScriptCore
- Timestamp:
- Sep 4, 2008, 8:11:54 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r36104 r36106 1 2008-09-04 Gavin Barraclough <[email protected]> 2 3 Reviewed by Geoffrey Garen. 4 5 Fixed an off-by-one error that would cause the StructureIDChain to 6 be one object too short. 7 8 Can't construct a test case because other factors make this not crash 9 (yet!). 10 11 * kjs/StructureID.cpp: 12 (KJS::StructureIDChain::StructureIDChain): 13 1 14 2008-09-04 Kevin Ollivier <[email protected]> 2 15 -
trunk/JavaScriptCore/kjs/StructureID.cpp
r36032 r36106 110 110 StructureIDChain::StructureIDChain(StructureID* structureID) 111 111 { 112 size_t size = 0;112 size_t size = 1; 113 113 114 114 StructureID* tmp = structureID; … … 117 117 tmp = static_cast<JSCell*>(tmp->prototype())->structureID(); 118 118 } 119 119 120 120 m_vector.set(new RefPtr<StructureID>[size]); 121 121 122 for (size_t i = 0; i < size; ++i) { 122 size_t i; 123 for (i = 0; i < size - 1; ++i) { 123 124 m_vector[i] = structureID; 124 125 structureID = static_cast<JSObject*>(structureID->prototype())->structureID(); 125 126 } 127 m_vector[i] = structureID; 126 128 } 127 129
Note:
See TracChangeset
for help on using the changeset viewer.