Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 2e46136bd6c2ae02d752d488a3c469d82f83899b..34a431d9b748846dc38768cb2298e1b75b45e30c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -3597,8 +3597,7 @@ void v8::Object::TurnOnAccessCheck() { |
// as optimized code does not always handle access checks. |
i::Deoptimizer::DeoptimizeGlobalObject(*obj); |
- i::Handle<i::Map> new_map = |
- isolate->factory()->CopyMap(i::Handle<i::Map>(obj->map())); |
+ i::Handle<i::Map> new_map = i::Map::Copy(i::Handle<i::Map>(obj->map())); |
new_map->set_is_access_check_needed(true); |
obj->set_map(*new_map); |
} |