Index: test/cctest/heap/test-heap.cc |
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc |
index 88aee8adf89e4794ded2445a3261d83a01ca650f..97fb96dadbb3c52c26ed6612faab738ab1e5e8c4 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -6277,6 +6277,7 @@ static void RemoveCodeAndGC(const v8::FunctionCallbackInfo<v8::Value>& args) { |
Handle<JSFunction> fun = Handle<JSFunction>::cast(obj); |
fun->ReplaceCode(*isolate->builtins()->CompileLazy()); |
fun->shared()->ReplaceCode(*isolate->builtins()->CompileLazy()); |
+ fun->shared()->set_bytecode_array(isolate->heap()->undefined_value()); |
isolate->heap()->CollectAllAvailableGarbage("remove code and gc"); |
} |