Changeset 281123 in webkit


Ignore:
Timestamp:
Aug 16, 2021 4:58:07 PM (3 years ago)
Author:
achristensen@apple.com
Message:

Fix null crash after r281110
https://bugs.webkit.org/show_bug.cgi?id=225737

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::reportResourceTiming):
I saw a nullptr crash here in EWS from bug 229167.
Looks like there's a case where we can call reportResourceTiming without a resource.
Early return if m_resource is null.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r281110 r281123  
     12021-08-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix null crash after r281110
     4        https://bugs.webkit.org/show_bug.cgi?id=225737
     5
     6        * loader/SubresourceLoader.cpp:
     7        (WebCore::SubresourceLoader::reportResourceTiming):
     8        I saw a nullptr crash here in EWS from bug 229167.
     9        Looks like there's a case where we can call reportResourceTiming without a resource.
     10        Early return if m_resource is null.
     11
    1122021-08-16  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebCore/loader/SubresourceLoader.cpp

    r280859 r281123  
    886886void SubresourceLoader::reportResourceTiming(const NetworkLoadMetrics& networkLoadMetrics)
    887887{
    888     if (!ResourceTimingInformation::shouldAddResourceTiming(*m_resource))
     888    if (!m_resource || !ResourceTimingInformation::shouldAddResourceTiming(*m_resource))
    889889        return;
    890890
Note: See TracChangeset for help on using the changeset viewer.