Re: Object creation in SpiderMonkey 45

Mihai Dobrescu <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On Thursday, May 5, 2016 at 7:38:32 PM UTC+3, Mihai Dobrescu wrote:
> On Thursday, May 5, 2016 at 7:27:05 PM UTC+3, Boris Zbarsky wrote:
> > On 5/5/16 11:19 AM, Mihai Dobrescu wrote:
> > >          JSObject *obj = JS_NewObject(cx, &jsDataClass<jsPropertyType>::fClass);
> > 
> > Here's your problem.  You didn't give it the right prototype.
> > 
> > Things used to default to "if you pass no prototype and just the class 
> > we'll do some fragile lookup to try to figure out the right prototype", 
> > but that went away in https://bugzilla.mozilla.org/show_bug.cgi?id=1125567
> > 
> > So you need to pass in the right prototype object here.
> > 
> > -Boris
> 
> I don't understand what you mean. It is 45, not 38.

+ I used to pass nullptr for prototype, in 38, and it worked.
I would expect that after initialization of classes, all the stuff to work as their definitions are loaded, including their functions.
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.