Closed Bug 738356 Opened 13 years ago Closed 13 years ago

Add JSAPI for binding functions

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

I want this for bug 726949.
Assignee: general → bzbarsky
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Attachment #608590 - Flags: review?(jorendorff)
Whiteboard: [need review]
Comment on attachment 608590 [details] [diff] [review] Add JSAPI for doing the equivalent of Function.prototype.bind. Looks good. Please change the functions JS_BindCallable and js_fun_bind to have return type JSObject * rather than an out parameter. Can we have a jsapi-test? See js/src/jsapi-tests/README.
Attachment #608590 - Flags: review?(jorendorff) → review+
> Please change the functions JS_BindCallable and js_fun_bind to have return type > JSObject* rather than an out parameter. And use an out param boolean to communicate failure state? That seems odd for the JS engine... > Can we have a jsapi-test? Probably, once I have time to work on this again.
Per irc comments, just use NULL return to indicate failure.
Attachment #608590 - Attachment is obsolete: true
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: