Bug 561444 - "Assertion failure: title->ownercx == cx || title->ownercx->thread == cx->thread, at ../jslock.cpp:1414" with multiple threads. r=igor.

This commit is contained in:
Jason Orendorff
2010-04-27 12:29:45 -05:00
parent c8dbb55ce6
commit 73fba1c611
3 changed files with 54 additions and 19 deletions

View File

@@ -7203,19 +7203,6 @@ js_GetXMLObject(JSContext *cx, JSXML *xml)
return obj;
}
/*
* A JSXML cannot be shared among threads unless it has an object.
* A JSXML cannot be given an object unless:
* (a) it has no parent; or
* (b) its parent has no object (therefore is thread-private); or
* (c) its parent's object is locked.
*
* Once given an object, a JSXML is immutable.
*/
JS_ASSERT(!xml->parent ||
!xml->parent->object ||
JS_IS_OBJ_LOCKED(cx, xml->parent->object));
obj = NewXMLObject(cx, xml);
if (!obj)
return NULL;