Landing the fix for bug 330169 on the branches. Patch from Michael Daumling, r=mrbkap, a=timr/mrbkap
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_0_BRANCH@195726 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1762,7 +1762,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
||||
qn = NULL;
|
||||
if (pn->pn_type == TOK_XMLCOMMENT) {
|
||||
if (flags & XSF_IGNORE_COMMENTS)
|
||||
return PN2X_SKIP_CHILD;
|
||||
goto skip_child;
|
||||
xml_class = JSXML_CLASS_COMMENT;
|
||||
} else if (pn->pn_type == TOK_XMLPI) {
|
||||
if (IS_XML(str)) {
|
||||
@@ -1775,7 +1775,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
||||
}
|
||||
|
||||
if (flags & XSF_IGNORE_PROCESSING_INSTRUCTIONS)
|
||||
return PN2X_SKIP_CHILD;
|
||||
goto skip_child;
|
||||
|
||||
qn = ParseNodeToQName(cx, pn, inScopeNSes, JS_FALSE);
|
||||
if (!qn)
|
||||
@@ -1808,6 +1808,10 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
||||
return NULL;
|
||||
return xml;
|
||||
|
||||
skip_child:
|
||||
js_LeaveLocalRootScope(cx);
|
||||
return PN2X_SKIP_CHILD;
|
||||
|
||||
#undef PN2X_SKIP_CHILD
|
||||
|
||||
syntax:
|
||||
|
||||
Reference in New Issue
Block a user