Closed Bug 908898 Opened 12 years ago Closed 12 years ago

Move JS_PSG/JS_PSGS/JS_PS_END into jsapi.h

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26
Tracking Status
firefox25 --- fixed
firefox26 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file, 1 obsolete file)

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)
Attached patch Better ideaSplinter Review
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+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: