-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Bugfix:OS5553123:Freeze while comparing valueOf()-injected null #307
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
Conversation
| dblRight = JavascriptConversion::ToNumber(aRight, scriptContext); | ||
| break; | ||
| case TypeIds_Boolean: | ||
| case TypeIds_Null: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should handle the undefined and symbol cases here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updated in latest rev.
|
Looks good. |
|
LGTM, signing off. |
|
Actually, can we get tests for the undefined/symbol case? otherwise looks good. |
| } | ||
|
|
||
| testRelationalComparison(null); | ||
| testRelationalComparison(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tcare, unit test covers 'undefined' and Symbol here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah saw the wrong revision. thanks :)
Chakra implementation of Abstract Relational Comparison operation fails to
handle 'null'. Specifically, it cause a browser tab to freeze when a comparison ("<")
is done with the left value being 'null' injected by valueOf() call through a prototype.
Add 'null' checking to fix this problem.
Add unit test.
Bugfix:OS5553123:Freeze while comparing valueOf()-injected null
Chakra implementation of Abstract Relational Comparison operation fails to
handle 'null'. Specifically, it cause a browser tab to freeze when a comparison ("<")
is done with the left value being 'null' injected by valueOf() call through a prototype.
Add 'null' checking to fix this problem.
Add unit test.