Fixup inconsistency due to change in Plugin loading requirements.
Some time ago plugin loading was changed to always occur with the
thread in kNative (see commit 3a256b1d3689). This adds asserts that
to plugin loading that the state is correct, fixes an incorrect
lock-annotation and fixes a test plugin that was missed.
Test: ./test.py --host
Test: atest CtsJdwpTunnelHostTestCases
Test: atest CtsJvmtiAttachingHostTestCases
Change-Id: Ib27ab58e9a357fa308a33da13a86e8d65575e9f4
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index db65d9c..0824eb4 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -878,7 +878,7 @@
}
// The plugin initialization function.
-extern "C" bool ArtPlugin_Initialize() REQUIRES_SHARED(art::Locks::mutator_lock_) {
+extern "C" bool ArtPlugin_Initialize() {
DCHECK(art::Runtime::Current()->GetJdwpProvider() == art::JdwpProvider::kAdbConnection);
// TODO Provide some way for apps to set this maybe?
DCHECK(gState == nullptr);