Skip to content
Snippets Groups Projects
Commit a0a6364e authored by deuce's avatar deuce
Browse files

Fix user subobject problems resulting from getting the iterator for the

class prototype...

Solution from
https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_InitClass

Note: By default JS_InitClass creates a prototype object but does not invoke
the constructor (JSClass.construct) on it. However, the prototype object
will eventually be finalized (JSClass.finalize). This inconsistency can
cause problems; for example, if the finalizer calls JS_GetPrivate(),
expecting that the constructor called JS_SetPrivate(), it may find that the
private data is NULL. The JSCLASS_CONSTRUCT_PROTOTYPE flag is one way to
avoid this inconsistency.
parent ab2fcd47
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment