diff --git a/content/ppapi_plugin/ppapi_blink_platform_impl.cc b/content/ppapi_plugin/ppapi_blink_platform_impl.cc index 0d5ff49589d19a..25ca97ea4b8c1d 100644 --- a/content/ppapi_plugin/ppapi_blink_platform_impl.cc +++ b/content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -66,9 +66,9 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { // unicode code points. It needs this information frequently so we cache it // here. std::map unicode_font_families_; - // For debugging crbug.com/312965 - base::PlatformThreadId creation_thread_; sk_sp font_loader_; + // For debugging https://crbug.com/312965 + base::SequenceCheckerImpl creation_thread_sequence_checker_; #endif }; @@ -86,9 +86,7 @@ bool PpapiBlinkPlatformImpl::SandboxSupport::LoadFont(CTFontRef src_font, #elif defined(OS_POSIX) -PpapiBlinkPlatformImpl::SandboxSupport::SandboxSupport() - : creation_thread_(base::PlatformThread::CurrentId()) { -} +PpapiBlinkPlatformImpl::SandboxSupport::SandboxSupport() {} void PpapiBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( WebUChar32 character, @@ -96,7 +94,7 @@ void PpapiBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( blink::WebFallbackFont* fallbackFont) { ppapi::ProxyLock::AssertAcquired(); // For debugging crbug.com/312965 - CHECK_EQ(creation_thread_, base::PlatformThread::CurrentId()); + CHECK(creation_thread_sequence_checker_.CalledOnValidSequence()); const std::map::const_iterator iter = unicode_font_families_.find(character); if (iter != unicode_font_families_.end()) { diff --git a/ppapi/tests/test_browser_font.cc b/ppapi/tests/test_browser_font.cc index 84fd7c1fafa777..9a56ea85e3fd03 100644 --- a/ppapi/tests/test_browser_font.cc +++ b/ppapi/tests/test_browser_font.cc @@ -54,8 +54,12 @@ std::string TestBrowserFont::TestMeasure() { int32_t length1 = font.MeasureText(pp::BrowserFontTextRun("WWW")); ASSERT_TRUE(length1 > 0); int32_t length2 = font.MeasureText(pp::BrowserFontTextRun("WWWWWWWW")); - ASSERT_TRUE(length2 >= length1 * 2); + + // Fallback font test. + int32_t length3 = font.MeasureText(pp::BrowserFontTextRun("こんにちは")); + ASSERT_TRUE(length3 > 0); + PASS(); }