Don't use class monitor lock when redefining
We used monitor lock on the class to potentially avoid redefinitions
on the same class happening simultaneously. Redefining a class needs
to update method verification flags and it will be non-trivial to
support simultaneous redefinition. Using monitor lock isn't ideal since
that can be obtained from the user code. This CL replaces the monitor
lock with a global lock to avoid simultaneous redefinitions. The current
implementation avoids redefinitions even on different classes but that
is okay since redefinitions don't happen frequently.
Bug: 215658725, 210434701
Test: art/test.py
Change-Id: If6e54ecf1f733181809c0130853ee05c7d6405a2
2 files changed