| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index 99510e3abc8aa69cea2ab7d8d459072640fcea96..fab743781cca1bb0a83a80dcea1daa15d159d54e 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -1643,9 +1643,15 @@ void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
|
| if (is_strong(language_mode())) {
|
| // TODO(conradw): It would be more efficient to define the properties with
|
| // the right attributes the first time round.
|
| + // Freeze the prototype.
|
| + proto =
|
| + NewNode(javascript()->CallRuntime(Runtime::kObjectFreeze, 1), proto);
|
| + // Freezing the prototype should never deopt.
|
| + PrepareFrameState(proto, BailoutId::None());
|
| + // Freeze the constructor.
|
| literal =
|
| NewNode(javascript()->CallRuntime(Runtime::kObjectFreeze, 1), literal);
|
| - // Freezing the class object should never deopt.
|
| + // Freezing the constructor should never deopt.
|
| PrepareFrameState(literal, BailoutId::None());
|
| }
|
|
|
|
|