Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1587)

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 143903018: Fixed crash on Android tcmalloc builds caused by vasprintf being incompatible to tcmalloc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index f0d757b62858eb550d2465c9b71524ecbc9c66d9..61a29050d147e6ad822b119c7f7c9ffdac3c2411 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1103,28 +1103,15 @@ void XMLDocumentParser::error(XMLErrors::ErrorType type, const char* message, va
if (isStopped())
return;
-#if HAVE(VASPRINTF)
- char* formattedMessage;
- if (vasprintf(&formattedMessage, message, args) == -1)
- return;
-#else
char formattedMessage[1024];
vsnprintf(formattedMessage, sizeof(formattedMessage) - 1, message, args);
-#endif
if (m_parserPaused) {
m_pendingCallbacks.append(adoptPtr(new PendingErrorCallback(type, reinterpret_cast<const xmlChar*>(formattedMessage), lineNumber(), columnNumber())));
-#if HAVE(VASPRINTF)
- free(formattedMessage);
-#endif
return;
}
handleError(type, formattedMessage, textPosition());
-
-#if HAVE(VASPRINTF)
- free(formattedMessage);
-#endif
}
void XMLDocumentParser::processingInstruction(const String& target, const String& data)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698