Changeset 245190 in webkit
- Timestamp:
- May 10, 2019, 1:10:59 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSFontFace.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r245181 r245190 1 2019-05-10 Brent Fulgham <bfulgham@apple.com> 2 3 Gracefully handle inaccessible font face data 4 https://bugs.webkit.org/show_bug.cgi?id=197762 5 <rdar://problem/50433861> 6 7 Reviewed by Per Arne Vollan. 8 9 Make sure CSS Font Face handling gracefully recovers from 10 missing font data. 11 12 Test: fast/text/missing-font-crash.html 13 14 * css/CSSFontFace.cpp: 15 (WebCore::CSSFontFace::fontLoadEventOccurred): 16 (WebCore::CSSFontFace::timeoutFired): 17 (WebCore::CSSFontFace::fontLoaded): 18 (WebCore::CSSFontFace::font): 19 1 20 2019-05-10 Simon Fraser <simon.fraser@apple.com> 2 21 -
trunk/Source/WebCore/css/CSSFontFace.cpp
r239461 r245190 1 1 /* 2 * Copyright (C) 2007 , 2008, 2011, 2013Apple Inc. All rights reserved.2 * Copyright (C) 2007-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 474 474 void CSSFontFace::fontLoadEventOccurred() 475 475 { 476 Ref<CSSFontFace> protectedThis(*this);477 478 476 // If the font is already in the cache, CSSFontFaceSource may report it's loaded before it is added here as a source. 479 477 // Let's not pump the state machine until we've got all our sources. font() and load() are smart enough to act correctly … … 492 490 void CSSFontFace::timeoutFired() 493 491 { 492 Ref<CSSFontFace> protectedThis(*this); 493 494 494 switch (status()) { 495 495 case Status::Loading: … … 685 685 void CSSFontFace::fontLoaded(CSSFontFaceSource&) 686 686 { 687 Ref<CSSFontFace> protectedThis(*this); 688 687 689 fontLoadEventOccurred(); 688 690 } … … 784 786 return nullptr; 785 787 788 Ref<CSSFontFace> protectedThis(*this); 789 786 790 // Our status is derived from the first non-failed source. However, this source may 787 791 // return null from font(), which means we need to continue looping through the remainder
Note:
See TracChangeset
for help on using the changeset viewer.