Commit 0ce0d934 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[classes] Make sure parent classes are never turned to setup mode

It doesn't make sense in general and moreover an attempt to do so might
cause hard stack overflow.

Bug: v8:11317
Change-Id: I2a6bbadba1ebc5c1496660c734df76a13600edac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643389Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72275}
parent 7792dfd6
......@@ -559,6 +559,8 @@ bool InitClassConstructor(
// Set map's prototype without enabling prototype setup mode for superclass
// because it does not make sense.
Map::SetPrototype(isolate, map, constructor_parent, false);
// Ensure that setup mode will never be enabled for superclass.
JSObject::MakePrototypesFast(constructor_parent, kStartAtReceiver, isolate);
}
Handle<NumberDictionary> elements_dictionary_template(
......
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