| Index: Source/core/xml/parser/XMLDocumentParser.cpp
|
| diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
|
| index a6be2b0a0589036b079d56f2d2cebf599782b13d..0ed06c912e96576b4f3f9104eebcaa43bfec8a1e 100644
|
| --- a/Source/core/xml/parser/XMLDocumentParser.cpp
|
| +++ b/Source/core/xml/parser/XMLDocumentParser.cpp
|
| @@ -898,7 +898,7 @@ struct _xmlSAX2Namespace {
|
| };
|
| typedef struct _xmlSAX2Namespace xmlSAX2Namespace;
|
|
|
| -static inline void handleNamespaceAttributes(Vector<Attribute>& prefixedAttributes, const xmlChar** libxmlNamespaces, int nbNamespaces, ExceptionState& es)
|
| +static inline void handleNamespaceAttributes(Vector<Attribute>& prefixedAttributes, const xmlChar** libxmlNamespaces, int nbNamespaces, ExceptionState& exceptionState)
|
| {
|
| xmlSAX2Namespace* namespaces = reinterpret_cast<xmlSAX2Namespace*>(libxmlNamespaces);
|
| for (int i = 0; i < nbNamespaces; i++) {
|
| @@ -908,7 +908,7 @@ static inline void handleNamespaceAttributes(Vector<Attribute>& prefixedAttribut
|
| namespaceQName = "xmlns:" + toString(namespaces[i].prefix);
|
|
|
| QualifiedName parsedName = anyName;
|
| - if (!Element::parseAttributeName(parsedName, XMLNSNames::xmlnsNamespaceURI, namespaceQName, es))
|
| + if (!Element::parseAttributeName(parsedName, XMLNSNames::xmlnsNamespaceURI, namespaceQName, exceptionState))
|
| return;
|
|
|
| prefixedAttributes.append(Attribute(parsedName, namespaceURI));
|
| @@ -924,7 +924,7 @@ struct _xmlSAX2Attributes {
|
| };
|
| typedef struct _xmlSAX2Attributes xmlSAX2Attributes;
|
|
|
| -static inline void handleElementAttributes(Vector<Attribute>& prefixedAttributes, const xmlChar** libxmlAttributes, int nbAttributes, ExceptionState& es)
|
| +static inline void handleElementAttributes(Vector<Attribute>& prefixedAttributes, const xmlChar** libxmlAttributes, int nbAttributes, ExceptionState& exceptionState)
|
| {
|
| xmlSAX2Attributes* attributes = reinterpret_cast<xmlSAX2Attributes*>(libxmlAttributes);
|
| for (int i = 0; i < nbAttributes; i++) {
|
| @@ -935,7 +935,7 @@ static inline void handleElementAttributes(Vector<Attribute>& prefixedAttributes
|
| AtomicString attrQName = attrPrefix.isEmpty() ? toAtomicString(attributes[i].localname) : attrPrefix + ":" + toString(attributes[i].localname);
|
|
|
| QualifiedName parsedName = anyName;
|
| - if (!Element::parseAttributeName(parsedName, attrURI, attrQName, es))
|
| + if (!Element::parseAttributeName(parsedName, attrURI, attrQName, exceptionState))
|
| return;
|
|
|
| prefixedAttributes.append(Attribute(parsedName, attrValue));
|
| @@ -975,17 +975,17 @@ void XMLDocumentParser::startElementNs(const AtomicString& localName, const Atom
|
| }
|
|
|
| Vector<Attribute> prefixedAttributes;
|
| - TrackExceptionState es;
|
| - handleNamespaceAttributes(prefixedAttributes, libxmlNamespaces, nbNamespaces, es);
|
| - if (es.hadException()) {
|
| + TrackExceptionState exceptionState;
|
| + handleNamespaceAttributes(prefixedAttributes, libxmlNamespaces, nbNamespaces, exceptionState);
|
| + if (exceptionState.hadException()) {
|
| setAttributes(newElement.get(), prefixedAttributes, parserContentPolicy());
|
| stopParsing();
|
| return;
|
| }
|
|
|
| - handleElementAttributes(prefixedAttributes, libxmlAttributes, nbAttributes, es);
|
| + handleElementAttributes(prefixedAttributes, libxmlAttributes, nbAttributes, exceptionState);
|
| setAttributes(newElement.get(), prefixedAttributes, parserContentPolicy());
|
| - if (es.hadException()) {
|
| + if (exceptionState.hadException()) {
|
| stopParsing();
|
| return;
|
| }
|
| @@ -1142,9 +1142,9 @@ void XMLDocumentParser::processingInstruction(const String& target, const String
|
| exitText();
|
|
|
| // ### handle exceptions
|
| - TrackExceptionState es;
|
| - RefPtr<ProcessingInstruction> pi = m_currentNode->document().createProcessingInstruction(target, data, es);
|
| - if (es.hadException())
|
| + TrackExceptionState exceptionState;
|
| + RefPtr<ProcessingInstruction> pi = m_currentNode->document().createProcessingInstruction(target, data, exceptionState);
|
| + if (exceptionState.hadException())
|
| return;
|
|
|
| pi->setCreatedByParser(true);
|
|
|