Re: Object creation in SpiderMonkey 45

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