Closed Bug 738356 Opened 8 years ago Closed 8 years ago
Add JSAPI for binding functions
I want this for bug 726949.
Assignee: general → bzbarsky
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Attachment #608590 - Flags: review?(jorendorff)
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
http://hg.mozilla.org/mozilla-central/rev/f381c497e47a with JSAPI test.
Whiteboard: [need review]
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.