diff --git a/src/compiler.cc b/src/compiler.cc index bdeb4aa9b5..bf6d41d854 100755 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -416,6 +416,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) { // object last we avoid this. shared->set_scope_info(*SerializedScopeInfo::Create(info->scope())); shared->set_code(*code); + if (!info->closure().is_null()) { + info->closure()->set_code(*code); + } // Set the expected number of properties for instances. SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());