Skip to content

Conversation

zenparsing
Copy link
Contributor

@zenparsing zenparsing commented Dec 2, 2019

Fixes #6338

This PR aligns the Object constructor with the spec. The previous implementation was treating args[1] as a new object and setting its prototype.

Copy link
Contributor

@boingoing boingoing left a comment

Choose a reason for hiding this comment

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

LGTM

Is there any perf impact?

@rhuanjl
Copy link
Collaborator

rhuanjl commented Apr 9, 2020

I've run the benchmark suite on this, there's no reliable performance impact based on them - I don't know if we could microbenchmark to assess more specifically?

That said - this has given me a thought, IsConstructorSuperCall is used heavily all over the place, could all functions that use it be made into template calls with their callers establishing the point? (idea extracted as #6407)

@zenparsing All that aside - ok for us to merge this?

@zenparsing
Copy link
Contributor Author

@rhuanjl Yes - please do. Thanks!

@rhuanjl rhuanjl merged commit b8d71ec into chakra-core:master Apr 10, 2020
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.

Reflect.construct corrupts members of the arguments list (error 80020101)
3 participants