⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245354 in webkit


Ignore:
Timestamp:
May 15, 2019, 2:45:00 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r245190. rdar://problem/50753948

Gracefully handle inaccessible font face data
https://bugs.webkit.org/show_bug.cgi?id=197762
<rdar://problem/50433861>

Reviewed by Per Arne Vollan.

Make sure CSS Font Face handling gracefully recovers from
missing font data.

Test: fast/text/missing-font-crash.html

  • css/CSSFontFace.cpp: (WebCore::CSSFontFace::fontLoadEventOccurred): (WebCore::CSSFontFace::timeoutFired): (WebCore::CSSFontFace::fontLoaded): (WebCore::CSSFontFace::font):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245190 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-607-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-607-branch/Source/WebCore/ChangeLog

    r245353 r245354  
     12019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r245190. rdar://problem/50753948
     4
     5    Gracefully handle inaccessible font face data
     6    https://bugs.webkit.org/show_bug.cgi?id=197762
     7    <rdar://problem/50433861>
     8   
     9    Reviewed by Per Arne Vollan.
     10   
     11    Make sure CSS Font Face handling gracefully recovers from
     12    missing font data.
     13   
     14    Test: fast/text/missing-font-crash.html
     15   
     16    * css/CSSFontFace.cpp:
     17    (WebCore::CSSFontFace::fontLoadEventOccurred):
     18    (WebCore::CSSFontFace::timeoutFired):
     19    (WebCore::CSSFontFace::fontLoaded):
     20    (WebCore::CSSFontFace::font):
     21   
     22    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     23
     24    2019-05-10  Brent Fulgham  <bfulgham@apple.com>
     25
     26            Gracefully handle inaccessible font face data
     27            https://bugs.webkit.org/show_bug.cgi?id=197762
     28            <rdar://problem/50433861>
     29
     30            Reviewed by Per Arne Vollan.
     31
     32            Make sure CSS Font Face handling gracefully recovers from
     33            missing font data.
     34
     35            Test: fast/text/missing-font-crash.html
     36
     37            * css/CSSFontFace.cpp:
     38            (WebCore::CSSFontFace::fontLoadEventOccurred):
     39            (WebCore::CSSFontFace::timeoutFired):
     40            (WebCore::CSSFontFace::fontLoaded):
     41            (WebCore::CSSFontFace::font):
     42
    1432019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
    244
  • branches/safari-607-branch/Source/WebCore/css/CSSFontFace.cpp

    r239461 r245354  
    11/*
    2  * Copyright (C) 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    474474void CSSFontFace::fontLoadEventOccurred()
    475475{
    476     Ref<CSSFontFace> protectedThis(*this);
    477 
    478476    // If the font is already in the cache, CSSFontFaceSource may report it's loaded before it is added here as a source.
    479477    // Let's not pump the state machine until we've got all our sources. font() and load() are smart enough to act correctly
     
    492490void CSSFontFace::timeoutFired()
    493491{
     492    Ref<CSSFontFace> protectedThis(*this);
     493   
    494494    switch (status()) {
    495495    case Status::Loading:
     
    685685void CSSFontFace::fontLoaded(CSSFontFaceSource&)
    686686{
     687    Ref<CSSFontFace> protectedThis(*this);
     688   
    687689    fontLoadEventOccurred();
    688690}
     
    784786        return nullptr;
    785787
     788    Ref<CSSFontFace> protectedThis(*this);
     789   
    786790    // Our status is derived from the first non-failed source. However, this source may
    787791    // return null from font(), which means we need to continue looping through the remainder
Note: See TracChangeset for help on using the changeset viewer.