Skip to content

Commit

Permalink
Cherry-pick 1806344. rdar://121396693
Browse files Browse the repository at this point in the history
    REGRESSION(273148@main): Crash on veggiegrill.com
    https://bugs.webkit.org/show_bug.cgi?id=267878

    Reviewed by Alex Christensen and Chris Dumez.

    There are some cases in which we enter this function with m_image being nullptr.
    Call updateFromElementIgnoringPreviousError in those cases.

    No new tests since I couldn't create a reliable reduction. The issue seems to be
    highly timing sensitive.

    * Source/WebCore/loader/ImageLoader.cpp:
    (WebCore::ImageLoader::updateFromElementIgnoringPreviousErrorToSameValue):

    Canonical link: https://commits.webkit.org/273321@main

Identifier: 273288.4@safari-7619.1.1-branch
  • Loading branch information
MyahCobbs committed Jan 23, 2024
1 parent 1d8e10c commit 6104943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/loader/ImageLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void ImageLoader::updateFromElementIgnoringPreviousError(RelevantMutation releva

void ImageLoader::updateFromElementIgnoringPreviousErrorToSameValue()
{
if ((m_image && !m_image->allowsCaching()) || !m_failedLoadURL.isEmpty() || element().document().activeServiceWorker()) {
if (!m_image || !m_image->allowsCaching() || !m_failedLoadURL.isEmpty() || element().document().activeServiceWorker()) {
updateFromElementIgnoringPreviousError(RelevantMutation::Yes);
return;
}
Expand Down

0 comments on commit 6104943

Please sign in to comment.