summaryrefslogtreecommitdiff
path: root/compiler/elf_patcher.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-09-22 21:40:06 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-09-22 21:40:06 +0000
commit8380c7c246337e66291a88f633dfaa250457bb0f (patch)
treeb0e1a772012c1fefdb6550a987edcdb8387e9759 /compiler/elf_patcher.cc
parentb36bba6d35e88687852b108c8d4b73b3ec2a9397 (diff)
parent2d5f39ed5aeaeb7ca22b07b4c6e8c56348ef8893 (diff)
Merge "Add ScopedAssertNoThreadSuspension"
Diffstat (limited to 'compiler/elf_patcher.cc')
-rw-r--r--compiler/elf_patcher.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/elf_patcher.cc b/compiler/elf_patcher.cc
index 92eb4d8955..0646b75f37 100644
--- a/compiler/elf_patcher.cc
+++ b/compiler/elf_patcher.cc
@@ -188,9 +188,8 @@ bool ElfPatcher::PatchElf() {
compiler_driver_->GetMethodsToPatch().size() +
compiler_driver_->GetClassesToPatch().size());
}
- Thread* self = Thread::Current();
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- const char* old_cause = self->StartAssertNoThreadSuspension("ElfPatcher");
+ ScopedAssertNoThreadSuspension ants(Thread::Current(), "ElfPatcher");
typedef std::vector<const CompilerDriver::CallPatchInformation*> CallPatches;
const CallPatches& code_to_patch = compiler_driver_->GetCodeToPatch();
@@ -259,8 +258,6 @@ bool ElfPatcher::PatchElf() {
SetPatchLocation(patch, PointerToLowMemUInt32(get_image_address_(cb_data_, target)));
}
- self->EndAssertNoThreadSuspension(old_cause);
-
if (write_patches_) {
return WriteOutPatchData();
}