Re: Create a new native object with a constructor

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
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.

-Boris
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.