Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct test/built-ins/Function/prototype/bind/15.3.4.5-15-5.js #958

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

JosephPecoraro
Copy link
Contributor

The length property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes #957.

The `length` property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes tc39#957.
---*/

var canConfigurable = false;
var hasProperty = false;
function foo() { }
var obj = foo.bind({});
hasProperty = obj.hasOwnProperty("length");
delete obj.caller;
delete obj.length;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, why were we deleting obj.caller here?

Thanks for finding this false positive.

This is also a reminder to convert these legacy tests to use the property helpers.

Btw, a reference for the length descriptor from the specs

8. Perform ! DefinePropertyOrThrow(F, "length", PropertyDescriptor {[[Value]]: L, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leobalter
Copy link
Member

@JosephPecoraro can you sign the CLA, please? https://tc39.github.io/test262-cla/

If you already work for a org w/ a membership to ECMA, this is not necessary. Just confirm and I'll be able to merge this.

@JosephPecoraro
Copy link
Contributor Author

I had signed the agreement in the past for (#761). You can clean it up and land.

@leobalter leobalter merged commit 5424c81 into tc39:master Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants