diff options
| author | Sebastien Hertz <shertz@google.com> | 2015-04-08 09:36:07 +0200 |
|---|---|---|
| committer | Sebastien Hertz <shertz@google.com> | 2015-05-18 10:20:08 +0200 |
| commit | 6650075fb831379d24cfafc3d56442e742418688 (patch) | |
| tree | b69ebc7f02846c8b664380a4979fa2053386e51e /runtime/debugger.h | |
| parent | d8b19f1869f3cb1b7a6db3268ff2e2e6bbc6543b (diff) | |
| download | art-6650075fb831379d24cfafc3d56442e742418688.tar.gz art-6650075fb831379d24cfafc3d56442e742418688.tar.bz2 art-6650075fb831379d24cfafc3d56442e742418688.zip | |
JDWP: more GC safety
Ensures GC safety when keeping references that may be moved by GC:
- SingleStepControl: stores ArtMethod* in a GcRoot
- ModBasket: stores references in a StackHandleScope
Bug: 18166750
(cherry picked from commit 261bc044a3575512869586593e99e97cd8b1c321)
Change-Id: I35971a901537956739d1f089d61cb4ea9dc6c93d
Diffstat (limited to 'runtime/debugger.h')
| -rw-r--r-- | runtime/debugger.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h index 789a0a4dca..811d345262 100644 --- a/runtime/debugger.h +++ b/runtime/debugger.h @@ -109,8 +109,8 @@ class SingleStepControl { return stack_depth_; } - mirror::ArtMethod* GetMethod() const { - return method_; + mirror::ArtMethod* GetMethod() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + return method_.Read(); } const std::set<uint32_t>& GetDexPcs() const { @@ -138,7 +138,7 @@ class SingleStepControl { // set of DEX pcs associated to the source line number where the suspension occurred. // This is used to support SD_INTO and SD_OVER single-step depths so we detect when a single-step // causes the execution of an instruction in a different method or at a different line number. - mirror::ArtMethod* method_; + GcRoot<mirror::ArtMethod> method_; std::set<uint32_t> dex_pcs_; DISALLOW_COPY_AND_ASSIGN(SingleStepControl); |
