Changeset 183128 in webkit
- Timestamp:
- Apr 22, 2015 1:44:32 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r183124 r183128 1 2015-04-22 Mark Lam <mark.lam@apple.com> 2 3 SparseArrayEntry's write barrier owner should be the SparseArrayValueMap. 4 https://bugs.webkit.org/show_bug.cgi?id=144067 5 6 Reviewed by Michael Saboff. 7 8 Currently, there are a few places where the JSObject that owns the 9 SparseArrayValueMap is designated as the owner of the SparseArrayEntry 10 write barrier. This is a bug and can result in the GC collecting the 11 SparseArrayEntry even though it is being referenced by the 12 SparseArrayValueMap. This patch fixes the bug. 13 14 * runtime/JSObject.cpp: 15 (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists): 16 (JSC::JSObject::putIndexedDescriptor): 17 * tests/stress/sparse-array-entry-update-144067.js: Added. 18 (useMemoryToTriggerGCs): 19 (foo): 20 1 21 2015-04-22 Mark Lam <mark.lam@apple.com> 2 22 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r182406 r183128 585 585 // and attributes are default so no need to set them. 586 586 if (value) 587 map->add(this, i).iterator->value.set(vm, this, value);587 map->add(this, i).iterator->value.set(vm, map, value); 588 588 } 589 589 … … 1718 1718 { 1719 1719 VM& vm = exec->vm(); 1720 auto map = m_butterfly->arrayStorage()->m_sparseMap.get(); 1720 1721 1721 1722 if (descriptor.isDataDescriptor()) { 1722 1723 if (descriptor.value()) 1723 entryInMap->set(vm, this, descriptor.value());1724 entryInMap->set(vm, map, descriptor.value()); 1724 1725 else if (oldDescriptor.isAccessorDescriptor()) 1725 entryInMap->set(vm, this, jsUndefined());1726 entryInMap->set(vm, map, jsUndefined()); 1726 1727 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~Accessor; 1727 1728 return; … … 1746 1747 accessor->setSetter(vm, exec->lexicalGlobalObject(), setter); 1747 1748 1748 entryInMap->set(vm, this, accessor);1749 entryInMap->set(vm, map, accessor); 1749 1750 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~ReadOnly; 1750 1751 return;
Note: See TracChangeset
for help on using the changeset viewer.