| Index: runtime/vm/gc_marker.cc
|
| ===================================================================
|
| --- runtime/vm/gc_marker.cc (revision 34118)
|
| +++ runtime/vm/gc_marker.cc (working copy)
|
| @@ -249,7 +249,12 @@
|
| // If the code wasn't strongly visited through other references
|
| // after skipping the function's code pointer, then we disconnect the
|
| // code from the function.
|
| - func->ptr()->code_ = Code::null();
|
| + bool is_closure =
|
| + Function::KindBits::decode(func->ptr()->kind_tag_) ==
|
| + RawFunction::kClosureFunction;
|
| + func->ptr()->code_ = is_closure
|
| + ? StubCode::LazyCompileClosure_entry()->code()
|
| + : Code::null();
|
| func->ptr()->unoptimized_code_ = Code::null();
|
| if (FLAG_log_code_drop) {
|
| // NOTE: This code runs while GC is in progress and runs within
|
|
|