Closed
Bug 1280838
Opened 10 years ago
Closed 10 years ago
JS_NewObject doc out-of-date with respect to JS_ConstructObject
Categories
(Developer Documentation Graveyard :: Mozilla Platform, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: braden, Unassigned)
References
()
Details
:: Developer Documentation Request
Request Type: Correction
Gecko Version: unspecified
Technical Contact:
:: Details
The documentation for JS_NewObject says:
If clasp has a constructor (JSClass.construct), use
JS_ConstructObject instead to ensure that the constructor
is called.
But JS_ConstructObject is obsolete (and nonexistent in recent releases).
Comment 1•10 years ago
|
||
:arai, can you help with this SpiderMonkey doc correction?
Component: JavaScript → Mozilla Platform
Flags: needinfo?(arai.unmht)
Comment 2•10 years ago
|
||
I'll look into this within a few days.
as a note from recent discussion, there's a plan to move whole JSAPI documentation in-tree, as a function comment or separated file, and generate the documentation automatically, to make it more maintainable.
that won't come shortly tho.
Comment 3•10 years ago
|
||
link to the mailing list topic here
https://groups.google.com/forum/#!topic/mozilla.dev.tech.js-engine/BEl9vI3rP1M
Comment 4•10 years ago
|
||
I feel, the clause in the document is saying about totally unrelated thing:
> If clasp has a constructor (JSClass.construct), use
> JS_ConstructObject instead to ensure that the constructor
> is called.
JSClass.construct (or JSClass.cOps.construct in trunk) is a hook that is called when invoking the object with the JSClass as a constructor.
That has nothing to do with creating an object with the JSClass.
So, the clause just need to be removed.
Comment 5•10 years ago
|
||
Removed.
Feel free to reopen or file a new bug if there's something unclear or wrong :)
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(arai.unmht)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•