Commit 1ed9516f authored by hpayer@chromium.org's avatar hpayer@chromium.org

Revert "Also mark as prototype when passing in while creating a function."

Breaks GC stress ARM64.

TBR=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/439983002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f6ddb89c
......@@ -1268,11 +1268,6 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name,
? isolate()->sloppy_function_with_readonly_prototype_map()
: isolate()->sloppy_function_map();
Handle<JSFunction> result = NewFunction(map, name, code);
if (!prototype->IsTheHole()) {
Handle<JSObject> js_proto = Handle<JSObject>::cast(prototype);
Handle<Map> new_map = Map::CopyAsPrototypeMap(handle(js_proto->map()));
JSObject::MigrateToMap(js_proto, new_map);
}
result->set_prototype_or_initial_map(*prototype);
return result;
}
......
......@@ -7288,7 +7288,6 @@ Handle<Map> Map::CopyForObserved(Handle<Map> map) {
Handle<Map> Map::CopyAsPrototypeMap(Handle<Map> map) {
if (map->is_prototype_map()) return map;
Handle<Map> result = Copy(map);
result->mark_prototype_map();
return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment