Move JS_PSG/JS_PSGS/JS_PS_END into jsapi.h

RESOLVED FIXED in Firefox 25

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

unspecified
mozilla26
Points:
---

Firefox Tracking Flags

(firefox25 fixed, firefox26 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 794883 [details] [diff] [review]
Move the definitions, add some scattered uses outside js/

We should expose this stuff for more general use.  Various bits of code outside the JS engine could already make use of it.

The type-checking finickiness here has passed try, at least scattered across various try-pushes, but I don't have the URLs quite handy right now.  I'll probably do a precautionary final push of it just to be safe before landing.

If you have better ideas for how to do that type-checking, I'm all ears, but I don't see much.  Implicit conversion of functions to function pointers is usually pretty nice, but it hurts a bit here.
Attachment #794883 - Flags: review?(jorendorff)
(Assignee)

Comment 1

5 years ago
Created attachment 794931 [details] [diff] [review]
Better idea

Actually, a better idea -- pass the value to a function taking a JSNative argument.  If it compiles, the value will convert to JSNative, and we're good.  This should work everywhere, without needing to worry about decltype and other madness.
Attachment #794883 - Attachment is obsolete: true
Attachment #794883 - Flags: review?(jorendorff)
Attachment #794931 - Flags: review?(jorendorff)
Comment on attachment 794931 [details] [diff] [review]
Better idea

Review of attachment 794931 [details] [diff] [review]:
-----------------------------------------------------------------

Very nice.
Attachment #794931 - Flags: review?(jorendorff) → review+

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/5991872b4ce3
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
https://hg.mozilla.org/releases/mozilla-beta/rev/1ee91c4cf828
status-firefox25: --- → fixed
status-firefox26: --- → fixed
You need to log in before you can comment on or make changes to this bug.