mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 18:25:52 +00:00
Bug 330169: Replaced early exits in ParseNodeToXML() with a jump to skip_child so js_LeaveLocalRootScope() can be called correctly. r=mrbkap
This commit is contained in:
parent
ff8c92ef9f
commit
d5cca305bd
@ -1758,7 +1758,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)) {
|
||||
@ -1771,7 +1771,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)
|
||||
@ -1804,6 +1804,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:
|
||||
|
Loading…
Reference in New Issue
Block a user