Re: Create a new native object with a constructor

Braden McDaniel <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On Mon, 2016-06-20 at 15:11 -0400, Boris Zbarsky wrote:
> On 6/20/16 1:09 PM, Braden McDaniel wrote:
> > Is it?  That requires that I have an Object.  The global object is
> > handy enough; but is that what I want?
> 
> It is.
> 
> Note also https://bugzilla.mozilla.org/show_bug.cgi?id=1275315 which 
> will harmonize the signatures of the various JS_Get*Prototype
> functions, or rather create new functions that do the same thing and
> just take a cx and have maybe less-confusing names.  But in the
> meantime, passing the global to JS_GetObjectPrototype is what you
> want.

Okay; got it.  (And as it happens, it just made more sense for me to
keep the prototypes resulting from JS_InitClass somewhere accessible.)

-- 

Braden McDaniel <[email protected]>
_______________________________________________
dev-tech-js-engine mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.