Skip to content

Add a test for abrupt completion from the target's length getter in Function.prototype.bind - #5110

Open
Koreangung15 wants to merge 2 commits into
tc39:mainfrom
Koreangung15:function-bind-length-error
Open

Add a test for abrupt completion from the target's length getter in Function.prototype.bind#5110
Koreangung15 wants to merge 2 commits into
tc39:mainfrom
Koreangung15:function-bind-length-error

Conversation

@Koreangung15

Copy link
Copy Markdown

This PR adds a test case verifying that Function.prototype.bind propagates an abrupt completion produced by Get in step 6.a.

Function.prototype.bind checks whether target (this value) has an own "length" property. If it does, step 6.a obtains targetLength by performing Get(target, "length"). Therefore, if the target's "length" property is an accessor property whose getter throws an exception, Function.prototype.bind must propagate that exception.

The filename and test structure mirror test/built-ins/Function/prototype/bind/instance-name-error.js, which verifies abrupt completion propagation while accessing the target's "name" property, while this PR adds the corresponding test for the target's "length" property.

@Koreangung15
Koreangung15 requested a review from a team as a code owner August 19, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant