forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[builtins] fix Object.fromEntries fast-path
Bug: chromium:1272026 Change-Id: Ic569c61b21d4c9c95d62e731a48076c871dd74ec Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303804 Reviewed-by: Marja Hölttä <[email protected]> Commit-Queue: Tobias Tebbi <[email protected]> Cr-Commit-Position: refs/heads/main@{#78119}
- Loading branch information
Showing
2 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// 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. | ||
|
||
let calledReturn = false; | ||
Object.prototype.return = function () { | ||
calledReturn = true; | ||
}; | ||
try { | ||
Object.fromEntries([0]); | ||
} catch(e) {} | ||
assertEquals(true, calledReturn); |