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

Changeset 245894 in webkit


Ignore:
Timestamp:
May 30, 2019, 11:05:18 AM (7 years ago)
Author:
Wenson Hsieh
Message:

Rare crash under WebPage::shouldIgnoreMetaViewport const when shrinking to fit content
https://bugs.webkit.org/show_bug.cgi?id=198374
<rdar://problem/51261348>

Reviewed by Tim Horton.

This is a speculative fix for the crash; what appears to be happening is that the shrink-to-fit-content timer
is somehow being scheduled after the page has already been closed. We can probably fix this by bailing when
scheduling shrink-to-fit-content if m_isClosed is true.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::scheduleShrinkToFitContent):
(WebKit::WebPage::immediatelyShrinkToFitContent):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245891 r245894  
     12019-05-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Rare crash under `WebPage::shouldIgnoreMetaViewport const` when shrinking to fit content
     4        https://bugs.webkit.org/show_bug.cgi?id=198374
     5        <rdar://problem/51261348>
     6
     7        Reviewed by Tim Horton.
     8
     9        This is a speculative fix for the crash; what appears to be happening is that the shrink-to-fit-content timer
     10        is somehow being scheduled after the page has already been closed. We can probably fix this by bailing when
     11        scheduling shrink-to-fit-content if m_isClosed is true.
     12
     13        * WebProcess/WebPage/ios/WebPageIOS.mm:
     14        (WebKit::WebPage::scheduleShrinkToFitContent):
     15        (WebKit::WebPage::immediatelyShrinkToFitContent):
     16
    1172019-05-30  Truitt Savell  <tsavell@apple.com>
    218
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r245872 r245894  
    32933293void WebPage::scheduleShrinkToFitContent()
    32943294{
     3295    if (m_isClosed)
     3296        return;
     3297
    32953298    m_shrinkToFitContentTimer.restart();
    32963299}
     
    33043307bool WebPage::immediatelyShrinkToFitContent()
    33053308{
     3309    if (m_isClosed)
     3310        return false;
     3311
    33063312    if (!shouldIgnoreMetaViewport())
    33073313        return false;
Note: See TracChangeset for help on using the changeset viewer.