Currently XMLArray stored in XML instances are shrunk during the GC to free unused capacity. This complicates the implementation of the parallel marking in bug 638660. As shrinking mutates the state this may require an extra locking during the marking depending on implementation details. It would be nice to remove this code. If we get regression reports, we could change the code to do the shrinking when removing the XML elements in the same way as we manage the capacity of dense arrays.
Created attachment 540615 [details] [diff] [review] v1 Here is a trivial patch. Lets see if we have some tests that depends on xml shrinking during the GC.
Comment on attachment 540615 [details] [diff] [review] v1 The patch passed the try server.
I don't think I am the right person for the review here because I don't have any background information about this "trim" behavior. This patch makes an important improvement for the parallel marking patch and we should take it if there are no serious arguments against it. Brendan or Jason could you do the review?
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/0428dbdf3d58