When retrying a failed alloc use the new size if class was redefined

When jvmti redefines the class it can potentially change the size of the
object. If there are any allocations in progress on suspended threads
(for ex: the thread got suspended because of a GC while in the middle of
allocation) we restart the allocations. When restarting an allocation,
we should use the updated size of the class. This wasn't a correctness
issue since when we restart the allocation we call PreObjectAllocated
listeners if any redefinition has happened and that would update the
size. This was only causing failures with the Check that was using the
old size. It is cleaner if we just call the new alloc with the new size.

Bug:207842562
Test:testrunner.py --dex2oat-jobs 4 --jit --no-relocate --forcecopy --64
--host -t 2005-pause-all-redefine-multithreaded

Change-Id: I6e5bf1b5439a1a20f7b1a333b1eda4aa4effa290
1 file changed