bug 522867 - eliminating the local root check on the fast path of the GC allocator. r=brendan,gal

This commit is contained in:
Igor Bukanov
2009-11-12 12:53:25 +01:00
parent 3e0c25e549
commit 2a64516247
6 changed files with 260 additions and 181 deletions

View File

@@ -3165,7 +3165,7 @@ DeepCopySetInLRS(JSContext *cx, JSXMLArray *from, JSXMLArray *to, JSXML *parent,
JSXML *kid2;
JSString *str;
JS_ASSERT(cx->localRootStack);
JS_ASSERT(JS_THREAD_DATA(cx)->localRootStack);
n = from->length;
if (!XMLArraySetCapacity(cx, to, n))
@@ -3223,7 +3223,7 @@ DeepCopyInLRS(JSContext *cx, JSXML *xml, uintN flags)
JSObject *ns, *ns2;
/* Our caller must be protecting newborn objects. */
JS_ASSERT(cx->localRootStack);
JS_ASSERT(JS_THREAD_DATA(cx)->localRootStack);
JS_CHECK_RECURSION(cx, return NULL);
@@ -4607,7 +4607,7 @@ ResolveValue(JSContext *cx, JSXML *list, JSXML **result)
jsval id, tv;
/* Our caller must be protecting newborn objects. */
JS_ASSERT(cx->localRootStack);
JS_ASSERT(JS_THREAD_DATA(cx)->localRootStack);
if (list->xml_class != JSXML_CLASS_LIST || list->xml_kids.length != 0) {
if (!js_GetXMLObject(cx, list))