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

Ensure "safe" toJSON doesn't break EventEmitters #388

Merged
merged 1 commit into from
Dec 9, 2012

Conversation

othiym23
Copy link
Contributor

@othiym23 othiym23 commented Dec 8, 2012

V8 and / or the JS spec are apparently extremely wily about interpreting values as potential indexes for arrays -- even hex strings can be converted internally back to numbers when passed to Object.defineProperty(). This should fix #387.

None of the tests break with this change, but as the bug is sort of a race condition, I couldn't easily come up with a new test case. The breaking test code on #387 no longer crashes when left running for a decent length of time, at least.

mikeal added a commit that referenced this pull request Dec 9, 2012
Ensure "safe" toJSON doesn't break EventEmitters
@mikeal mikeal merged commit d734337 into request:master Dec 9, 2012
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.

Request.prototype.toJSON is wrong in the head
3 participants