Index: content/child/font_warmup_win_unittest.cc |
diff --git a/content/child/font_warmup_win_unittest.cc b/content/child/font_warmup_win_unittest.cc |
index 21ba20da10a1a662f26cadfcf406f458b800485b..9494655b2b3f867e55bd72033ea5f3435b6d2d1f 100644 |
--- a/content/child/font_warmup_win_unittest.cc |
+++ b/content/child/font_warmup_win_unittest.cc |
@@ -16,6 +16,7 @@ |
#include "base/sys_byteorder.h" |
#include "base/win/windows_version.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "third_party/skia/include/core/SkRefCnt.h" |
#include "third_party/skia/include/core/SkString.h" |
#include "third_party/skia/include/core/SkTypeface.h" |
#include "third_party/skia/include/ports/SkFontMgr.h" |
@@ -130,7 +131,9 @@ const wchar_t* kTestFontFamilyInvalid = L"InvalidFont"; |
class TestSkFontMgr : public SkFontMgr { |
public: |
- TestSkFontMgr() { content::SetPreSandboxWarmupFontMgrForTesting(this); } |
+ TestSkFontMgr() { |
+ content::SetPreSandboxWarmupFontMgrForTesting(sk_ref_sp(this)); |
+ } |
~TestSkFontMgr() override { |
content::SetPreSandboxWarmupFontMgrForTesting(nullptr); |
} |