bug 426520, r=brendan a1.9.0.10=dveditz
git-svn-id: svn://10.0.0.236/trunk@256997 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -7841,15 +7841,18 @@ js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp)
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
for (tmp = fp->scopeChain; tmp; tmp = OBJ_GET_PARENT(cx, obj)) {
|
||||
obj = tmp;
|
||||
if (!OBJ_GET_PROPERTY(cx, obj, JS_DEFAULT_XML_NAMESPACE_ID, &v))
|
||||
for (tmp = fp->scopeChain; tmp; tmp = OBJ_GET_PARENT(cx, tmp)) {
|
||||
JSClass *clasp = OBJ_GET_CLASS(cx, tmp);
|
||||
if (clasp == &js_BlockClass || clasp == &js_WithClass)
|
||||
continue;
|
||||
if (!OBJ_GET_PROPERTY(cx, tmp, JS_DEFAULT_XML_NAMESPACE_ID, &v))
|
||||
return JS_FALSE;
|
||||
if (!JSVAL_IS_PRIMITIVE(v)) {
|
||||
fp->xmlNamespace = JSVAL_TO_OBJECT(v);
|
||||
*vp = v;
|
||||
return JS_TRUE;
|
||||
}
|
||||
obj = tmp;
|
||||
}
|
||||
|
||||
nsobj = js_ConstructObject(cx, &js_NamespaceClass.base, NULL, obj, 0, NULL);
|
||||
|
||||
Reference in New Issue
Block a user