Only mark the descriptor that is valid for the map in question. If this map
transitioned from a map with a different descriptor array (or has no back pointer), mark all valid descriptors from the start. This fixes the following memory leak: Map A shares a descriptor array with map B. Map B adds constant function c that in its scope holds on to an instance of B. If the descriptor array of A would keep all the shared descriptors alive, including c, this keeps alive both A and c indefinitely. This CL also fixes a bug in descriptor array trimming. When trimming descriptor arrays we need to trim off the slack as well (thus the entire storage); and since we are trimming a descriptor array, we need to trim * kDescriptorSize. Review URL: https://chromiumcodereview.appspot.com/12084066 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Showing
Please
register
or
sign in
to comment