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

Changeset 294843 in webkit


Ignore:
Timestamp:
May 25, 2022, 4:49:50 PM (4 years ago)
Author:
Alan Coon
Message:

Cherry-pick r293922. rdar://problem/93602176

null ptr deref in WebCore::Frame::setPrinting
​https://bugs.webkit.org/show_bug.cgi?id=240173

Reviewed by Wenson Hsieh.

Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.

  • page/Frame.cpp: (WebCore::Frame::setPrinting):

Canonical link: ​https://commits.webkit.org/250369@main
git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@293922 268f45cc-cd09-0410-ab3c-d52691b4dbfc

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

Legend:

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

    r294842 r294843  
     12022-05-19  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r293922. rdar://problem/93602176
     4
     5    null ptr deref in WebCore::Frame::setPrinting
     6    https://bugs.webkit.org/show_bug.cgi?id=240173
     7   
     8    Reviewed by Wenson Hsieh.
     9   
     10    Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.
     11   
     12    * page/Frame.cpp:
     13    (WebCore::Frame::setPrinting):
     14   
     15    Canonical link: https://commits.webkit.org/250369@main
     16    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     17
     18    2022-05-06  Gabriel Nava Marino  <gnavamarino@apple.com>
     19
     20            null ptr deref in WebCore::Frame::setPrinting
     21            https://bugs.webkit.org/show_bug.cgi?id=240173
     22
     23            Reviewed by Wenson Hsieh.
     24
     25            Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.
     26
     27            * page/Frame.cpp:
     28            (WebCore::Frame::setPrinting):
     29
    1302022-05-19  Alan Coon  <alancoon@apple.com>
    231
  • branches/safari-613-branch/Source/WebCore/page/Frame.cpp

    r290933 r294843  
    602602void Frame::setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot shouldAdjustViewSize)
    603603{
    604     if (!view())
     604    if (!view() || !document())
    605605        return;
    606606    // In setting printing, we should not validate resources already cached for the document.
Note: See TracChangeset for help on using the changeset viewer.