Bug 503190 - Include assertions in the C++ translator output. r=smaug.
This commit is contained in:
@@ -505,25 +505,32 @@ public final class HtmlAttributes implements Attributes {
|
||||
mode = AttributeName.SVG;
|
||||
}
|
||||
|
||||
public HtmlAttributes cloneAttributes(Interner interner) throws SAXException {
|
||||
assert (length == 0 && xmlnsLength == 0) || mode == 0 || mode == 3;
|
||||
public HtmlAttributes cloneAttributes(Interner interner)
|
||||
throws SAXException {
|
||||
assert (length == 0
|
||||
// [NOCPP[
|
||||
&& xmlnsLength == 0
|
||||
// ]NOCPP]
|
||||
)
|
||||
|| mode == 0 || mode == 3;
|
||||
HtmlAttributes clone = new HtmlAttributes(0);
|
||||
for (int i = 0; i < length; i++) {
|
||||
clone.addAttribute(names[i].cloneAttributeName(interner), Portability.newStringFromString(values[i])
|
||||
// [NOCPP[
|
||||
, XmlViolationPolicy.ALLOW
|
||||
// ]NOCPP]
|
||||
clone.addAttribute(names[i].cloneAttributeName(interner),
|
||||
Portability.newStringFromString(values[i])
|
||||
// [NOCPP[
|
||||
, XmlViolationPolicy.ALLOW
|
||||
// ]NOCPP]
|
||||
);
|
||||
}
|
||||
// [NOCPP[
|
||||
for (int i = 0; i < xmlnsLength; i++) {
|
||||
clone.addAttribute(xmlnsNames[i],
|
||||
xmlnsValues[i], XmlViolationPolicy.ALLOW);
|
||||
clone.addAttribute(xmlnsNames[i], xmlnsValues[i],
|
||||
XmlViolationPolicy.ALLOW);
|
||||
}
|
||||
// ]NOCPP]
|
||||
return clone; // XXX!!!
|
||||
}
|
||||
|
||||
|
||||
public boolean equalsAnother(HtmlAttributes other) {
|
||||
assert mode == 0 || mode == 3 : "Trying to compare attributes in foreign content.";
|
||||
int otherLength = other.getLength();
|
||||
|
||||
Reference in New Issue
Block a user