Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: runtime/vm/compiler_test.cc

Issue 2620413002: Fix various memory leaks in unit tests detected by a new version of ASAN. (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_test.cc
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index 5225c53a9cc2fb7a42e752d40f12075fe0d3005c..6e44b6c4a2c06415b117692b69e3e4e1de99bd60 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -102,10 +102,13 @@ VM_TEST_CASE(CompileFunctionOnHelperThread) {
ASSERT(isolate->background_compiler() != NULL);
isolate->background_compiler()->CompileOptimized(func);
Monitor* m = new Monitor();
- MonitorLocker ml(m);
- while (!func.HasOptimizedCode()) {
- ml.WaitWithSafepointCheck(thread, 1);
+ {
+ MonitorLocker ml(m);
+ while (!func.HasOptimizedCode()) {
+ ml.WaitWithSafepointCheck(thread, 1);
+ }
}
+ delete m;
BackgroundCompiler::Stop(isolate);
}
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698