| Issue 3: | Segfault when calling context.init_standard_classes() on 2 different objects with the same context | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The following test reproduces the error:
def testInitStandardClassesWorksTwice(self):
cx = pydermonkey.Runtime().new_context()
obj = cx.new_object()
cx.init_standard_classes(obj)
obj2 = cx.new_object()
cx.init_standard_classes(obj2)
This results in the following error, followed by a segfault:
Assertion failure: !OBJ_GET_PARENT(cx, obj), at
spidermonkey-1.8.1pre/js/src/jsobj.cpp:3237
Sep 8, 2009
Project Member
#1
var...@gmail.com
Oct 1, 2009
I expect you need to do JS_SetParent(cx, obj, NULL) after doing JS_NewObject if you're going to be doing JS_InitStandardClasses on it. |