Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 4e4fb385b966f7f5949a35a7e2ad1e8ad9fed9c1..ca290780fca6aa1f85ffdb8c1e1fbb10b5054be4 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -5838,7 +5838,11 @@ MaybeObject* DescriptorArray::RemoveTransitions() { |
| return new_descriptors; |
| } |
| - |
| +// We need the whiteness witness since sort will reshuffle the entries in the |
| +// descriptor array. If the descriptor array were to be gray, the sort would |
| +// potentially swap a black and a white member. This would resulting in |
|
Michael Starzinger
2012/05/24 14:28:54
Reasoning is off.
[...] were to be black, the shu
Toon Verwaest
2012/05/25 12:27:26
Done.
|
| +// accidentally reclaiming the white member if the descriptor array owned the |
| +// unique pointer. |
| void DescriptorArray::SortUnchecked(const WhitenessWitness& witness) { |
| // In-place heap sort. |
| int len = number_of_descriptors(); |