Commit c44d7ffb authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

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

This is a reland of 0ce0d934

This is a clean reland. The test failure on GC stress bot seems to be
related to GC timing and --stress-flush-bytecode.

Original change's description:
> [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/+/2643389
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72275}

Tbr: verwaest@chromium.org
Bug: v8:11317
Change-Id: Ic73efff7d9690c0edf7fa07b8b90691e9775a748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642461
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72286}
parent 8cc2a64d
...@@ -559,6 +559,8 @@ bool InitClassConstructor( ...@@ -559,6 +559,8 @@ bool InitClassConstructor(
// Set map's prototype without enabling prototype setup mode for superclass // Set map's prototype without enabling prototype setup mode for superclass
// because it does not make sense. // because it does not make sense.
Map::SetPrototype(isolate, map, constructor_parent, false); 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( 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