Changeset 214714 in webkit
- Timestamp:
- Apr 1, 2017 1:14:15 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r214642 r214714 1 2017-04-01 Oleksandr Skachkov <gskachkov@gmail.com> 2 3 Object with numerical keys with gaps gets filled by NaN values 4 https://bugs.webkit.org/show_bug.cgi?id=164412 5 6 Reviewed by Merk Lam. 7 8 * stress/object-number-properties.js: Added. 9 (assert): 10 (boo): 11 1 12 2017-03-30 Michael Saboff <msaboff@apple.com> 2 13 -
trunk/Source/JavaScriptCore/ChangeLog
r214711 r214714 1 2017-04-01 Oleksandr Skachkov <gskachkov@gmail.com> 2 3 Object with numerical keys with gaps gets filled by NaN values 4 https://bugs.webkit.org/show_bug.cgi?id=164412 5 6 Reviewed by Mark Lam. 7 8 This patch fixes issue when object have two properties 9 with name as number. The issue appears when during invoking 10 convertDoubleToArrayStorage, array is filled by pNaN and 11 method converting it to real NaN. This happeneds because a 12 pNaN in a Double array is a hole, and Double arrays cannot 13 have NaN values. To fix issue we need to check value and 14 clear it if it pNaN. 15 16 * runtime/JSObject.cpp: 17 (JSC::JSObject::convertDoubleToArrayStorage): 18 1 19 2017-03-31 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r214135 r214714 1289 1289 for (unsigned i = 0; i < vectorLength; i++) { 1290 1290 double value = butterfly->contiguousDouble()[i]; 1291 if (value != value) { 1292 newStorage->m_vector[i].clear(); 1293 continue; 1294 } 1291 1295 newStorage->m_vector[i].setWithoutWriteBarrier(JSValue(JSValue::EncodeAsDouble, value)); 1292 if (value == value) 1293 newStorage->m_numValuesInVector++; 1296 newStorage->m_numValuesInVector++; 1294 1297 } 1295 1298
Note: See TracChangeset
for help on using the changeset viewer.