bug 517199 - typed GC free lsists - newborn refactoring. r=brendan

This commit is contained in:
Igor Bukanov
2009-10-01 08:13:04 +04:00
parent 325423b2fb
commit bf9a0f2d25
10 changed files with 86 additions and 78 deletions

View File

@@ -3385,9 +3385,9 @@ Descendants(JSContext *cx, JSXML *xml, jsval id)
/*
* Protect nameqn's object and strings from GC by linking list to it
* temporarily. The cx->newborn[GCX_OBJECT] GC root protects listobj,
* which protects list. Any other object allocations occuring beneath
* DescendantsHelper use local roots.
* temporarily. The newborn GC root for the last allocated object
* protects listobj, which protects list. Any other object allocations
* occurring beneath DescendantsHelper use local roots.
*/
list->name = nameqn;
if (!js_EnterLocalRootScope(cx))
@@ -7182,9 +7182,7 @@ uint32 xml_serial;
JSXML *
js_NewXML(JSContext *cx, JSXMLClass xml_class)
{
JSXML *xml;
xml = (JSXML *) js_NewGCXML(cx, GCX_XML);
JSXML *xml = js_NewGCXML(cx);
if (!xml)
return NULL;