Fix TSAN issue with atlas expansion.
Removes SkString-related malloc from DM crash handler, and adds null check in ProxyRefTest.
Bug: skia:3550
Change-Id: I143c532b5d231a426b1a96b854e1effd6379b673
Reviewed-on: https://skia-review.googlesource.com/48440
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 7954744..777a593 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -116,7 +116,9 @@
template <typename... Args>
static void vlog(const char* fmt, Args&&... args) {
if (gVLog) {
- fprintf(gVLog, "%s\t", HumanizeMs(SkTime::GetMSecs() - kStartMs).c_str());
+ char s[64];
+ HumanizeMs(s, 64, SkTime::GetMSecs() - kStartMs);
+ fprintf(gVLog, "%s\t", s);
fprintf(gVLog, fmt, args...);
fflush(gVLog);
}