Index: test/cctest/test-mark-compact.cc |
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc |
index 5f13bd25ab4b3e2f5f76b1f49e391a4833b994d9..4e5764b0f2762e8c28a5676ea3474d4f3e3e712a 100644 |
--- a/test/cctest/test-mark-compact.cc |
+++ b/test/cctest/test-mark-compact.cc |
@@ -156,11 +156,7 @@ TEST(MarkCompactCollector) { |
{ HandleScope scope(isolate); |
// allocate a garbage |
Handle<String> func_name = factory->InternalizeUtf8String("theFunction"); |
- Handle<JSFunction> function = factory->NewFunctionWithPrototype( |
- func_name, factory->undefined_value()); |
- Handle<Map> initial_map = factory->NewMap( |
- JS_OBJECT_TYPE, JSObject::kHeaderSize); |
- function->set_initial_map(*initial_map); |
+ Handle<JSFunction> function = factory->NewFunction(func_name); |
JSReceiver::SetProperty(global, func_name, function, NONE, SLOPPY).Check(); |
factory->NewJSObject(function); |