Closed
Bug 642274
Opened 13 years ago
Closed 13 years ago
Provide a way to compare to jsvals with '=='
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: sdwilsh, Assigned: cdleary)
References
()
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
16.96 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
You can compare two jsvals strictly ('==='), but there is no API to do a simple equality comparison ('=='). This would be handy to have.
Assignee | ||
Updated•13 years ago
|
Assignee: general → cdleary
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #520026 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 2•13 years ago
|
||
Forgot to hg add the tests.
Attachment #520026 -
Attachment is obsolete: true
Attachment #520026 -
Flags: review?(jwalden+bmo)
Attachment #520027 -
Flags: review?(jwalden+bmo)
Comment 3•13 years ago
|
||
Comment on attachment 520027 [details] [diff] [review] Loose equality API. > bool >+LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, JSBool *result) This should probably start off with the XML equality check, h8. Arguably this should be always-inline for parity with current behavior, but if we can get away with not having to over-specify that, sounds good to me. Keep an eye on perf numbers when you land this. We have a somewhat strange way of phrasing the spec algorithm with respect to DefaultValue-ing and stuff. Make sure to add documentation for this to MDN -- looks like you can just copy the JS_StrictlyEqual page and make a couple tweaks.
Attachment #520027 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/d4c0875dc41a https://developer.mozilla.org/En/SpiderMonkey/JSAPI_Reference/JS_LooselyEqual
Status: NEW → ASSIGNED
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/cfe6c2e05c07 (backout due to test bustage)
Whiteboard: fixed-in-tracemonkey
Reporter | ||
Comment 6•13 years ago
|
||
When might this land again?
Assignee | ||
Comment 7•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/d10c089a6888
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 8•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/d10c089a6888
Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•