-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This runtime function behaves like StoreDataPropertyInLiteral, except it can throw, since it's also used for defining public class fields. Unlike the literal use case, class field can end up throwing due to field initializers doing things like freezing the instance. Bug: chromium:1264828 (cherry picked from commit 1cc12b278e22d9ad4f0154e4b9e63cbb707b4657) Change-Id: I3ea4d15ad9b906c26763f022c8e22b757fa80b6c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401871 Reviewed-by: Igor Sheludko <[email protected]> Reviewed-by: Shu-yu Guo <[email protected]> Commit-Queue: Lutz Vahl <[email protected]> Cr-Commit-Position: refs/branch-heads/9.7@{#40} Cr-Branched-From: 49162da-refs/heads/9.7.106@{#1} Cr-Branched-From: a7e9b8f-refs/heads/main@{#77674}
- Loading branch information
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2021 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// Flags: --no-lazy-feedback-allocation | ||
|
||
{ | ||
class C { | ||
x = Object.freeze(this); | ||
} | ||
// Call once to install slow handler. | ||
assertThrows(() => { new C(); }); | ||
// Hit the slow handler. | ||
assertThrows(() => { new C(); }); | ||
} |