Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSCLASS_CONSTRUCT_PROTOTYPE undeclared in mozilla 17

27 views
Skip to first unread message

bche...@gmail.com

unread,
Mar 28, 2013, 11:13:32 PM3/28/13
to
Hi all,

I'm porting a code from 1.8.5 to latest stable version of spidermonkey but I get the following error:

error: 'JSCLASS_CONSTRUCT_PROTOTYPE' undeclared here (not in a function)

Looking at the file jsapi.h it isn't in it. Any idea how to replace this flag? What's the value?

- benoît

Jeff Walden

unread,
Mar 29, 2013, 8:05:00 PM3/29/13
to
JSCLASS_CONSTRUCT_PROTOTYPE was a mostly-internal hackaround used for a couple internal classes to make bootstrapping/initialization code shorter. It might somewhat have had that effect, at the call site. But it resulted in a bunch of grungy internals code that did things "just so" to get the vaguely-promised ultimate semantics. Inside SpiderMonkey we removed all uses of it somewhere around mid-2011. Luke mailed the list on November 14, 2011 asking about removing it, and got no responses. I'm not sure when we actually removed it, but it was likely somewhat soon after.

As for replacing a use of it. That really depends on how/what you're doing. Your best option is probably to manually munge the prototype object into submission ;-) after calling JS_InitClass. But really it depends what you're doing, how this fits into the structure of your existing code, and so on. It's very hard to say in isolation what the best alternative is.

Jeff
0 new messages