Changeset 243576 in webkit
- Timestamp:
- Mar 27, 2019, 4:43:48 PM (7 years ago)
- Location:
- branches/safari-607-branch
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/structure-flattenDictionary-should-clear-unused-property-slots.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/Structure.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/JSTests/ChangeLog
r243571 r243576 1 2019-03-27 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r243069. rdar://problem/49308056 4 5 Structure::flattenDictionary() should clear unused property slots. 6 https://bugs.webkit.org/show_bug.cgi?id=195871 7 <rdar://problem/48959497> 8 9 Reviewed by Michael Saboff. 10 11 JSTests: 12 13 * stress/structure-flattenDictionary-should-clear-unused-property-slots.js: Added. 14 15 Source/JavaScriptCore: 16 17 It currently attempts to do this but fails because it's actually clearing up the 18 preCapacity region instead. The fix is simply to account for the preCapacity 19 when computing the start address of the property slots. 20 21 * runtime/Structure.cpp: 22 (JSC::Structure::flattenDictionaryStructure): 23 24 25 26 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243069 268f45cc-cd09-0410-ab3c-d52691b4dbfc 27 28 2019-03-18 Mark Lam <mark.lam@apple.com> 29 30 Structure::flattenDictionary() should clear unused property slots. 31 https://bugs.webkit.org/show_bug.cgi?id=195871 32 <rdar://problem/48959497> 33 34 Reviewed by Michael Saboff. 35 36 * stress/structure-flattenDictionary-should-clear-unused-property-slots.js: Added. 37 1 38 2019-03-27 Alan Coon <alancoon@apple.com> 2 39 -
branches/safari-607-branch/Source/JavaScriptCore/ChangeLog
r243571 r243576 1 2019-03-27 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r243069. rdar://problem/49308056 4 5 Structure::flattenDictionary() should clear unused property slots. 6 https://bugs.webkit.org/show_bug.cgi?id=195871 7 <rdar://problem/48959497> 8 9 Reviewed by Michael Saboff. 10 11 JSTests: 12 13 * stress/structure-flattenDictionary-should-clear-unused-property-slots.js: Added. 14 15 Source/JavaScriptCore: 16 17 It currently attempts to do this but fails because it's actually clearing up the 18 preCapacity region instead. The fix is simply to account for the preCapacity 19 when computing the start address of the property slots. 20 21 * runtime/Structure.cpp: 22 (JSC::Structure::flattenDictionaryStructure): 23 24 25 26 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243069 268f45cc-cd09-0410-ab3c-d52691b4dbfc 27 28 2019-03-18 Mark Lam <mark.lam@apple.com> 29 30 Structure::flattenDictionary() should clear unused property slots. 31 https://bugs.webkit.org/show_bug.cgi?id=195871 32 <rdar://problem/48959497> 33 34 Reviewed by Michael Saboff. 35 36 It currently attempts to do this but fails because it's actually clearing up the 37 preCapacity region instead. The fix is simply to account for the preCapacity 38 when computing the start address of the property slots. 39 40 * runtime/Structure.cpp: 41 (JSC::Structure::flattenDictionaryStructure): 42 1 43 2019-03-27 Alan Coon <alancoon@apple.com> 2 44 -
branches/safari-607-branch/Source/JavaScriptCore/runtime/Structure.cpp
r240375 r243576 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 … … 778 778 779 779 Butterfly* butterfly = object->butterfly(); 780 memset(781 butterfly->base(butterfly->indexingHeader()->preCapacity(this), beforeOutOfLineCapacity),782 0,783 (beforeOutOfLineCapacity - outOfLineSize()) * sizeof(EncodedJSValue));780 size_t preCapacity = butterfly->indexingHeader()->preCapacity(this); 781 void* base = butterfly->base(preCapacity, beforeOutOfLineCapacity); 782 void* startOfPropertyStorageSlots = reinterpret_cast<EncodedJSValue*>(base) + preCapacity; 783 memset(startOfPropertyStorageSlots, 0, (beforeOutOfLineCapacity - outOfLineSize()) * sizeof(EncodedJSValue)); 784 784 checkOffsetConsistency(); 785 785 }
Note:
See TracChangeset
for help on using the changeset viewer.