Skip to content

Commit

Permalink
fix deadlock in remote cache logging
Browse files Browse the repository at this point in the history
In the stack trace in the bug, #16 findOrCreateStrike() grabs the
lock, and then #8 Dump() makes calls that grab the lock. This is
only a problem with debug code.

Bug: chromium:1255085

Change-Id: Idcaad8bf2e8c2823bec899ee2b96a74ae666c164
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455501
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
  • Loading branch information
herbderby authored and SkCQ committed Oct 4, 2021
1 parent b37fe54 commit 6bc9626
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/SkTypeface_remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ void SkScalerContextProxy::generateFontMetrics(SkFontMetrics* metrics) {
"skia", "generateFontMetrics", "rec", TRACE_STR_COPY(this->getRec().dump().c_str()));
if (this->getProxyTypeface()->isLogging()) {
SkDebugf("GlyphCacheMiss generateFontMetrics: %s\n", this->getRec().dump().c_str());
SkDEBUGCODE(SkStrikeCache::Dump());
}

// Font metrics aren't really used for render, so just zero out the data and return.
Expand Down

0 comments on commit 6bc9626

Please sign in to comment.