зеркало из https://github.com/mozilla/gecko-dev.git
- Fix longstanding goof in js_PushLocalRoot, where m (n % local-root-chunk)
was returned rather than n (the index of lrs->scopeMark). I'm mortified. - Followup fix to GC local rooting fix in ParseNodeToXML -- missed a few early returns from what used to be no-local-roots switch cases.
This commit is contained in:
Родитель
054c0f4704
Коммит
46a2ff94ea
|
@ -625,7 +625,7 @@ js_PushLocalRoot(JSContext *cx, JSLocalRootStack *lrs, jsval v)
|
|||
}
|
||||
lrs->rootCount = n + 1;
|
||||
lrc->roots[m] = v;
|
||||
return (int) m;
|
||||
return (int) n;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -346,7 +346,7 @@ typedef struct JSLocalRootStack {
|
|||
JSLocalRootChunk firstChunk;
|
||||
} JSLocalRootStack;
|
||||
|
||||
#define JSLRS_NULL_MARK ((uint16) -1)
|
||||
#define JSLRS_NULL_MARK ((uint32) -1)
|
||||
|
||||
struct JSContext {
|
||||
JSCList links;
|
||||
|
|
|
@ -1467,7 +1467,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
|||
pn2 = pn->pn_head;
|
||||
xml = ParseNodeToXML(cx, pn2, inScopeNSes, flags);
|
||||
if (!xml)
|
||||
return NULL;
|
||||
goto fail;
|
||||
flags &= ~XSF_PRECOMPILED_ROOT;
|
||||
|
||||
n = pn->pn_count;
|
||||
|
@ -1526,7 +1526,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
|||
case TOK_XMLLIST:
|
||||
xml = js_NewXML(cx, JSXML_CLASS_LIST);
|
||||
if (!xml)
|
||||
return NULL;
|
||||
goto fail;
|
||||
|
||||
n = pn->pn_count;
|
||||
if (!XMLArraySetCapacity(cx, &xml->xml_kids, n))
|
||||
|
@ -1596,7 +1596,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
|||
JSMSG_DUPLICATE_XML_ATTR,
|
||||
js_ValueToPrintableString(cx,
|
||||
ATOM_KEY(pn2->pn_atom)));
|
||||
return NULL;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1735,7 +1735,7 @@ ParseNodeToXML(JSContext *cx, JSParseNode *pn, JSXMLArray *inScopeNSes,
|
|||
JSMSG_RESERVED_ID,
|
||||
js_ValueToPrintableString(cx,
|
||||
STRING_TO_JSVAL(str)));
|
||||
return NULL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (flags & XSF_IGNORE_PROCESSING_INSTRUCTIONS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче