From 80cd474be3aa348ce7c73efdda994b4e46840a2c Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Mon, 23 Apr 2012 00:14:45 +0800 Subject: Fix unit test by holding compiler_lock_ on ourselves. Because in previous CL, we removed the MutexLock in the Materialize for parallel compilation, we don't hold the lock before we call LoadElfFromCompilationUnit anymore. Thus, we have to acquire for the lock in LoadElfFromCompilationUnit. Change-Id: Ia1b059bdffafc54a473820244bcfcfc634771061 --- src/compiler_llvm/compiler_llvm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler_llvm/compiler_llvm.cc') diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index 2ebf5f65f7..1623b2cef5 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -216,7 +216,7 @@ void CompilerLLVM::EnableAutoElfLoading() { void CompilerLLVM::LoadElfFromCompilationUnit(const CompilationUnit* cunit) { - compiler_lock_.AssertHeld(); + MutexLock GUARD(compiler_lock_); DCHECK(cunit->IsMaterialized()) << cunit->GetElfIndex(); if (!elf_loader_->LoadElfAt(cunit->GetElfIndex(), -- cgit v1.2.3-59-g8ed1b