Closed Bug 524179 Opened 10 years ago Closed 9 years ago
_Date Get XXX, js _Date Get YYY
SpiderMonkey includes a set of js_DateSetXXX/js_DateSetXXX friend API where XXX is Year, Month, Date etc. This API is declared infallible even if they can throw JS exceptions. We should either remove them (a search over mxr.mozilla.org shows zero users). Or, if some embeddings do use them, we should at least fix their signature.
Seems to be used in http://mxr.mozilla.org/mozilla-central/source/storage/src/mozStoragePrivateHelpers.cpp#167 (not sure, but isn't this type of usage forbidden in the SpiderMonkey coding guidelines)
Assignee: general → wesongathedeveloper
Status: NEW → ASSIGNED
Attachment #481145 - Flags: review?(brendan)
Comment on attachment 481145 [details] [diff] [review] Patch What was the style guideline violated by the mozStorage code? /be
Attachment #481145 - Flags: review?(brendan) → review+
(In reply to comment #3) > What was the style guideline violated by the mozStorage code? Been a while, but if I remember correctly, I think I was confused by the fact that functions outside /js/* were calling js_* functions (my possibly incorrect interpretation of the guideline was that non /js/* callers needed to call JS_* functions only).
Truly internal js_ functions would not be callable across a library boundary, although we are all one happy libxul now, I guess (on most platforms and dev builds, anyway). But these are JS_FRIEND_API js_-prefixed APIs -- a bit unusual. Probably we should make them public API, fixing anything that's still buggy. /be
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.