OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2008 Holger Hans Peter Freyther | 7 * Copyright (C) 2008 Holger Hans Peter Freyther |
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 char* formattedMessage; | 1080 char* formattedMessage; |
1081 if (vasprintf(&formattedMessage, message, args) == -1) | 1081 if (vasprintf(&formattedMessage, message, args) == -1) |
1082 return; | 1082 return; |
1083 #else | 1083 #else |
1084 char formattedMessage[1024]; | 1084 char formattedMessage[1024]; |
1085 vsnprintf(formattedMessage, sizeof(formattedMessage) - 1, message, args); | 1085 vsnprintf(formattedMessage, sizeof(formattedMessage) - 1, message, args); |
1086 #endif | 1086 #endif |
1087 | 1087 |
1088 if (m_parserPaused) { | 1088 if (m_parserPaused) { |
1089 m_pendingCallbacks.append(adoptPtr(new PendingErrorCallback(type, reinte
rpret_cast<const xmlChar*>(formattedMessage), lineNumber(), columnNumber()))); | 1089 m_pendingCallbacks.append(adoptPtr(new PendingErrorCallback(type, reinte
rpret_cast<const xmlChar*>(formattedMessage), lineNumber(), columnNumber()))); |
| 1090 #if HAVE(VASPRINTF) |
| 1091 free(formattedMessage); |
| 1092 #endif |
1090 return; | 1093 return; |
1091 } | 1094 } |
1092 | 1095 |
1093 handleError(type, formattedMessage, textPosition()); | 1096 handleError(type, formattedMessage, textPosition()); |
1094 | 1097 |
1095 #if HAVE(VASPRINTF) | 1098 #if HAVE(VASPRINTF) |
1096 free(formattedMessage); | 1099 free(formattedMessage); |
1097 #endif | 1100 #endif |
1098 } | 1101 } |
1099 | 1102 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 sax.initialized = XML_SAX2_MAGIC; | 1601 sax.initialized = XML_SAX2_MAGIC; |
1599 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); | 1602 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax,
&state); |
1600 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; | 1603 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; |
1601 parseChunk(parser->context(), parseString); | 1604 parseChunk(parser->context(), parseString); |
1602 finishParsing(parser->context()); | 1605 finishParsing(parser->context()); |
1603 attrsOK = state.gotAttributes; | 1606 attrsOK = state.gotAttributes; |
1604 return state.attributes; | 1607 return state.attributes; |
1605 } | 1608 } |
1606 | 1609 |
1607 } // namespace WebCore | 1610 } // namespace WebCore |
OLD | NEW |