summaryrefslogtreecommitdiff
path: root/runtime/openjdkjvmti/art_jvmti.h
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2017-01-19 14:57:28 -0800
committer Alex Light <allight@google.com> 2017-01-20 11:32:03 -0800
commita7e38d8aaacfca85b40b5df654f85c0979968672 (patch)
tree34322c79fc328a608fc17303453c8ec1f38b9eaa /runtime/openjdkjvmti/art_jvmti.h
parent05778764cb11162b6f3ff72386135ed45a07af33 (diff)
Use original dex file for retransformation.
The spec requires us to pass the dex file as it appeared before any retransformation-capable agents had modified it to the ClassFileLoadHooks when RetransformClasses is called. We do this by saving the initial dex file bytes into the class as a byte[]. Bug: 32369916 Test: mma -j40 test-art-host Change-Id: Ic6af3738cd2a831e91ba1144f502fa58b3c333e4
Diffstat (limited to 'runtime/openjdkjvmti/art_jvmti.h')
-rw-r--r--runtime/openjdkjvmti/art_jvmti.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/runtime/openjdkjvmti/art_jvmti.h b/runtime/openjdkjvmti/art_jvmti.h
index 1c84d4d0ce..256c3a6cec 100644
--- a/runtime/openjdkjvmti/art_jvmti.h
+++ b/runtime/openjdkjvmti/art_jvmti.h
@@ -36,6 +36,7 @@
#include <jni.h>
+#include "base/array_slice.h"
#include "base/casts.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -125,29 +126,6 @@ static inline jvmtiError CopyString(jvmtiEnv* env, const char* src, unsigned cha
return ret;
}
-struct ArtClassDefinition {
- jclass klass;
- jobject loader;
- std::string name;
- jobject protection_domain;
- jint dex_len;
- JvmtiUniquePtr dex_data;
- bool modified;
-
- ArtClassDefinition() = default;
- ArtClassDefinition(ArtClassDefinition&& o) = default;
-
- void SetNewDexData(ArtJvmTiEnv* env, jint new_dex_len, unsigned char* new_dex_data) {
- if (new_dex_data == nullptr) {
- return;
- } else if (new_dex_data != dex_data.get() || new_dex_len != dex_len) {
- modified = true;
- dex_len = new_dex_len;
- dex_data = MakeJvmtiUniquePtr(env, new_dex_data);
- }
- }
-};
-
const jvmtiCapabilities kPotentialCapabilities = {
.can_tag_objects = 1,
.can_generate_field_modification_events = 0,