Changeset 243069 in webkit
- Timestamp:
- Mar 18, 2019 9:18:10 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r243032 r243069 1 2019-03-18 Mark Lam <mark.lam@apple.com> 2 3 Structure::flattenDictionary() should clear unused property slots. 4 https://bugs.webkit.org/show_bug.cgi?id=195871 5 <rdar://problem/48959497> 6 7 Reviewed by Michael Saboff. 8 9 * stress/structure-flattenDictionary-should-clear-unused-property-slots.js: Added. 10 1 11 2019-03-15 Mark Lam <mark.lam@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r243065 r243069 1 2019-03-18 Mark Lam <mark.lam@apple.com> 2 3 Structure::flattenDictionary() should clear unused property slots. 4 https://bugs.webkit.org/show_bug.cgi?id=195871 5 <rdar://problem/48959497> 6 7 Reviewed by Michael Saboff. 8 9 It currently attempts to do this but fails because it's actually clearing up the 10 preCapacity region instead. The fix is simply to account for the preCapacity 11 when computing the start address of the property slots. 12 13 * runtime/Structure.cpp: 14 (JSC::Structure::flattenDictionaryStructure): 15 1 16 2019-03-18 Robin Morisset <rmorisset@apple.com> 2 17 -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r242123 r243069 1 1 /* 2 * Copyright (C) 2008 , 2009, 2013-2016Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 779 779 780 780 Butterfly* butterfly = object->butterfly(); 781 memset(782 butterfly->base(butterfly->indexingHeader()->preCapacity(this), beforeOutOfLineCapacity),783 0,784 781 size_t preCapacity = butterfly->indexingHeader()->preCapacity(this); 782 void* base = butterfly->base(preCapacity, beforeOutOfLineCapacity); 783 void* startOfPropertyStorageSlots = reinterpret_cast<EncodedJSValue*>(base) + preCapacity; 784 memset(startOfPropertyStorageSlots, 0, (beforeOutOfLineCapacity - outOfLineSize()) * sizeof(EncodedJSValue)); 785 785 checkOffsetConsistency(); 786 786 }
Note: See TracChangeset
for help on using the changeset viewer.