Closed
Bug 491646
Opened 15 years ago
Closed 15 years ago
Expose js_StrictlyEqual() to consumers
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: donny.viszneki, Assigned: jorendorff)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
1.56 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre Build Identifier: It would be nice for applications embedding Spidermonkey to have linker access to js_StrictlyEqual() :) Reproducible: Always
Reporter | ||
Comment 1•15 years ago
|
||
i disagree with the request (JS_FRIEND_API), but only because it's the wrong fix. either a JS_StrictlyEquals should be created or a JS_SomethingEquals should be which provides a flag arg that enables access to js_StrictlyEquals. Note that js shell uses js_StrictlyEquals which means that today you can't build js shell against js lib (I had a patch which let me build js shell against the library a while ago, clearly it doesn't anymore as I haven't provided that method).
Summary: make js_StrictlyEqual() JS_FRIEND_API → Expose js_StrictlyEqual() to consumers
Comment 3•15 years ago
|
||
Let's make a public API. Cc'ing folks one of whom should take this bug. Thanks, /be
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted1.9.2?
Comment 4•15 years ago
|
||
Forgot to thank Donny for the bug and patch -- thanks! /be
Reporter | ||
Comment 5•15 years ago
|
||
Until there is a proper API, it would be nice for this patch to be applied :)
Reporter | ||
Updated•15 years ago
|
Attachment #377007 -
Flags: review?(mrbkap)
Reporter | ||
Comment 6•15 years ago
|
||
Comment on attachment 377007 [details] [diff] [review] a real patch This just adds JS_FRIEND_API to js_StrictlyEqual()
Assignee | ||
Comment 7•15 years ago
|
||
Well, we might as well make it official in that case. This API depends on === being infallible. If desired I could change the signature to, JSBool JS_StrictlyEqual(JSContext *cs, jsval v1, jsval v2, JSBool *result); with the return value indicating success or failure, rather than === or !==. It's nice to think that === will be infallible forever, but who knows? Operator overloading in ES Harmony?
Assignee: general → jorendorff
Attachment #375951 -
Attachment is obsolete: true
Attachment #377007 -
Attachment is obsolete: true
Attachment #377682 -
Flags: review?(mrbkap)
Attachment #377007 -
Flags: review?(mrbkap)
Comment 8•15 years ago
|
||
=== and !== are infallible, this is important. Although past operator proposals have included these among the operators that could be defined by user types, I'm skeptical anything like those proposals will fly in Harmony. We should keep the signature infallible and bet on this. If we lose, API change! /be
Updated•15 years ago
|
Attachment #377682 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 9•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/2e1bbcf8a13e
Whiteboard: fixed-in-tracemonkey
Comment 10•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2e1bbcf8a13e
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: wanted1.9.2? → wanted1.9.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•