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

355 function prototype apply argument array like #358

Merged

Conversation

tmallery
Copy link

@tmallery tmallery commented Nov 1, 2017

#355
This fix matches ECMA5 behavior where an object passed in to apply as the second argument allows the call to proceed without exception.

Copy link
Collaborator

@gbrail gbrail left a comment

Choose a reason for hiding this comment

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

See the comment on "hasProperty."

Also this PR has a bunch of small commits in it. Can you see if you can "squash" them into a smaller number of commits? (I like to use "git rebase -i" for squashing but I'm sure that there are other ways.)

return obj != null && (
obj instanceof NativeArray ||
obj instanceof Arguments ||
ScriptableObject.getProperty(obj, "length") != Scriptable.NOT_FOUND
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use "hasProperty" here instead? It could actually make a performance difference.

@gbrail
Copy link
Collaborator

gbrail commented Nov 13, 2017

Thanks! That looks great. Now can you please squash this into one commit (right now there are 10)? Then I can take it from there and rebase and merge or whatever we need.

@tmallery tmallery force-pushed the 355_FunctionPrototypeApplyArgumentArrayLike branch from acd9102 to 6bb9605 Compare November 25, 2017 13:57
@tmallery tmallery force-pushed the 355_FunctionPrototypeApplyArgumentArrayLike branch from b64825e to 9779611 Compare November 25, 2017 14:31
@tmallery
Copy link
Author

Thanks for the review and I believe I've finally squashed the changes into one commit. Local 'check' checks out.

@gbrail
Copy link
Collaborator

gbrail commented Dec 1, 2017

Thanks -- looks good!

@gbrail gbrail merged commit c4f87b1 into mozilla:master Dec 1, 2017
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.

2 participants