Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Unified Diff: src/objects.cc

Issue 1586203003: [proxy] Reload the initial map after prototype lookup on constructable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: year++ Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698