bug 517749 - removal of weakRoots.newborn = null. r=mrbkap

This commit is contained in:
Igor Bukanov
2009-09-25 16:30:11 +04:00
parent 6bb78229f0
commit 54f35f075a
10 changed files with 111 additions and 224 deletions

View File

@@ -5466,20 +5466,14 @@ xml_attribute(JSContext *cx, uintN argc, jsval *vp)
static JSBool
xml_attributes(JSContext *cx, uintN argc, jsval *vp)
{
jsval name;
JSObject *qn;
JSTempValueRooter tvr;
JSBool ok;
name = ATOM_KEY(cx->runtime->atomState.starAtom);
qn = ToAttributeName(cx, name);
jsval name = ATOM_KEY(cx->runtime->atomState.starAtom);
JSObject *qn = ToAttributeName(cx, name);
if (!qn)
return JS_FALSE;
name = OBJECT_TO_JSVAL(qn);
JS_PUSH_SINGLE_TEMP_ROOT(cx, name, &tvr);
ok = GetProperty(cx, JS_THIS_OBJECT(cx, vp), name, vp);
JS_POP_TEMP_ROOT(cx, &tvr);
return ok;
JSAutoTempValueRooter tvr(cx, name);
return GetProperty(cx, JS_THIS_OBJECT(cx, vp), name, vp);
}
static JSXML *