Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 4d40f417f977598e99a11878e141a915b49dcdbe..697c1d3840f8aa301d07591019a49689f431d361 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13127,6 +13127,10 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate, |
ASSIGN_RETURN_ON_EXCEPTION( |
isolate, prototype, |
JSReceiver::GetProperty(new_target, prototype_string), Map); |
+ // The above prototype lookup might change the constructor and its |
+ // prototype, hence we have to reload the initial map. |
+ EnsureHasInitialMap(constructor); |
+ constructor_initial_map = handle(constructor->initial_map(), isolate); |
} |
// If prototype is not a JSReceiver, fetch the intrinsicDefaultProto from the |