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

Unified Diff: runtime/vm/compiler.cc

Issue 70183010: Fixes a couple problems with GC of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/code_patcher.h ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 30598)
+++ runtime/vm/compiler.cc (working copy)
@@ -734,8 +734,10 @@
LongJump* base = isolate->long_jump_base();
LongJump jump;
isolate->set_long_jump_base(&jump);
+ // Make sure unoptimized code is not collected while we are compiling.
+ const Code& unoptimized_code = Code::ZoneHandle(function.unoptimized_code());
// Skips parsing if we need to only install unoptimized code.
- if (!optimized && !Code::Handle(function.unoptimized_code()).IsNull()) {
+ if (!optimized && !unoptimized_code.IsNull()) {
InstallUnoptimizedCode(function);
isolate->set_long_jump_base(base);
return Error::null();
« no previous file with comments | « runtime/vm/code_patcher.h ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698