Closed
Bug 480850
(JS_New)
Opened 16 years ago
Closed 15 years ago
JSAPI should support creating objects given a constructor Function
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
|
6.25 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
We've known this is a missing API for a long time now.
Because FUN_CLASP is for good reasons non-public, it's far from straightforward for JSAPI applications to implement this. (I don't know that it's even possible without eval/JS_EvaluateScript.)
| Assignee | ||
Comment 1•16 years ago
|
||
I file this now because we've got an embedder rolling his own--and suffering:
http://github.com/meh/lulzjs/blob/93ea51e4a174cf5a3f1c0df9029cb38327de664d/js/lulzjs/lulzjs.cpp#L21-64
Note the bug obtaining `klass`. :( Incidentally, the crazy consequences of (unintentionally) creating objects with js_FunctionClass are surprisingly hard to diagnose.
| Assignee | ||
Comment 3•16 years ago
|
||
(memo to myself) Ash pointed out this is missing CHECK_REQUEST.
Comment 4•15 years ago
|
||
jorendorff: any reason (other than the missing CHECK_REQUEST mentioned in comment 3) that this isn't up for review/checkin?
Comment 5•15 years ago
|
||
I need this, and it works for me. Let's get it in?
Severity: normal → enhancement
| Assignee | ||
Comment 6•15 years ago
|
||
I'll post a patch with jsapi-test in the next couple hours.
| Assignee | ||
Comment 7•15 years ago
|
||
Attachment #390253 -
Attachment is obsolete: true
Attachment #432616 -
Flags: review?(mrbkap)
Updated•15 years ago
|
Attachment #432616 -
Flags: review?(mrbkap) → review+
Comment 8•15 years ago
|
||
What additional review does this patch need?
| Assignee | ||
Comment 9•15 years ago
|
||
It landed in tracemonkey last week.
http://hg.mozilla.org/tracemonkey/rev/869bebcf1f21
Alias: JS_New
Whiteboard: fixed-in-tracemonkey
Comment 10•15 years ago
|
||
Also pushed to projects/electrolysis:
http://hg.mozilla.org/projects/electrolysis/rev/faa984df7f45
Comment 11•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•