Skip to content

Commit

Permalink
REGRESSION(273148@main): Crash on veggiegrill.com
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rniwa committed Jan 22, 2024
1 parent fe1e481 commit 1806344
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 1806344

Please sign in to comment.