Backed out changeset 6403442ffa1d (failure on windows, winnt.h defines TokenType!)

This commit is contained in:
Luke Wagner
2010-03-18 22:26:47 -07:00
parent 8dd5428b52
commit c341fbf9cd
13 changed files with 680 additions and 635 deletions

View File

@@ -1268,10 +1268,11 @@ ParseNodeToQName(JSCompiler *jsc, JSParseNode *pn,
}
if (!uri) {
ReportCompileErrorNumber(jsc->context, &jsc->tokenStream, pn,
JSREPORT_ERROR, JSMSG_BAD_XML_NAMESPACE,
js_ValueToPrintableString(jsc->context,
STRING_TO_JSVAL(prefix)));
js_ReportCompileErrorNumber(jsc->context, &jsc->tokenStream, pn,
JSREPORT_ERROR,
JSMSG_BAD_XML_NAMESPACE,
js_ValueToPrintableString(jsc->context,
STRING_TO_JSVAL(prefix)));
return NULL;
}
@@ -1349,8 +1350,8 @@ ParseNodeToXML(JSCompiler *jsc, JSParseNode *pn,
int stackDummy;
if (!JS_CHECK_STACK_SIZE(cx, stackDummy)) {
ReportCompileErrorNumber(cx, &jsc->tokenStream, pn, JSREPORT_ERROR,
JSMSG_OVER_RECURSED);
js_ReportCompileErrorNumber(cx, &jsc->tokenStream, pn, JSREPORT_ERROR,
JSMSG_OVER_RECURSED);
return NULL;
}
@@ -1488,10 +1489,11 @@ ParseNodeToXML(JSCompiler *jsc, JSParseNode *pn,
/* Enforce "Well-formedness constraint: Unique Att Spec". */
for (pn3 = head; pn3 != pn2; pn3 = pn3->pn_next->pn_next) {
if (pn3->pn_atom == pn2->pn_atom) {
ReportCompileErrorNumber(cx, &jsc->tokenStream, pn2,
JSREPORT_ERROR, JSMSG_DUPLICATE_XML_ATTR,
js_ValueToPrintableString(cx,
ATOM_KEY(pn2->pn_atom)));
js_ReportCompileErrorNumber(cx, &jsc->tokenStream, pn2,
JSREPORT_ERROR,
JSMSG_DUPLICATE_XML_ATTR,
js_ValueToPrintableString(cx,
ATOM_KEY(pn2->pn_atom)));
goto fail;
}
}
@@ -1598,10 +1600,11 @@ ParseNodeToXML(JSCompiler *jsc, JSParseNode *pn,
attrjqn = attrj->name;
if (js_EqualStrings(GetURI(attrjqn), GetURI(qn)) &&
js_EqualStrings(GetLocalName(attrjqn), GetLocalName(qn))) {
ReportCompileErrorNumber(cx, &jsc->tokenStream, pn2,
JSREPORT_ERROR, JSMSG_DUPLICATE_XML_ATTR,
js_ValueToPrintableString(cx,
ATOM_KEY(pn2->pn_atom)));
js_ReportCompileErrorNumber(cx, &jsc->tokenStream, pn2,
JSREPORT_ERROR,
JSMSG_DUPLICATE_XML_ATTR,
js_ValueToPrintableString(cx,
ATOM_KEY(pn2->pn_atom)));
goto fail;
}
}
@@ -1638,10 +1641,11 @@ ParseNodeToXML(JSCompiler *jsc, JSParseNode *pn,
xml_class = JSXML_CLASS_COMMENT;
} else if (pn->pn_type == TOK_XMLPI) {
if (IS_XML(str)) {
ReportCompileErrorNumber(cx, &jsc->tokenStream, pn,
JSREPORT_ERROR, JSMSG_RESERVED_ID,
js_ValueToPrintableString(cx,
STRING_TO_JSVAL(str)));
js_ReportCompileErrorNumber(cx, &jsc->tokenStream, pn,
JSREPORT_ERROR,
JSMSG_RESERVED_ID,
js_ValueToPrintableString(cx,
STRING_TO_JSVAL(str)));
goto fail;
}
@@ -1686,7 +1690,8 @@ skip_child:
#undef PN2X_SKIP_CHILD
syntax:
ReportCompileErrorNumber(cx, &jsc->tokenStream, pn, JSREPORT_ERROR, JSMSG_BAD_XML_MARKUP);
js_ReportCompileErrorNumber(cx, &jsc->tokenStream, pn, JSREPORT_ERROR,
JSMSG_BAD_XML_MARKUP);
fail:
js_LeaveLocalRootScope(cx);
return NULL;