[webkit-changes] [WebKit/WebKit] 539e57: Crash under ResourceLoadNotifier::didFailToLoad()
Chris Dumez
noreply at github.com
Mon Feb 24 20:04:03 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 539e578437dc2b8a9ba34d91f829fda3e652a6a1
https://github.com/WebKit/WebKit/commit/539e578437dc2b8a9ba34d91f829fda3e652a6a1
Author: Chris Dumez <cdumez at apple.com>
Date: 2025-02-24 (Mon, 24 Feb 2025)
Changed paths:
M Source/WebCore/loader/ResourceLoadNotifier.cpp
M Source/WebCore/loader/ResourceLoadNotifier.h
M Source/WebCore/loader/ResourceLoader.cpp
Log Message:
-----------
Crash under ResourceLoadNotifier::didFailToLoad()
https://bugs.webkit.org/show_bug.cgi?id=288425
rdar://145498471
Reviewed by Ryosuke Niwa.
Update ResourceLoader to check that its m_identifier is valid before
calling ResourceLoadNotifier functions and pass the identifier to
those functions. This is safer since ResourceLoader owns the
identifier and m_identifier could change value during the execution
of a ResourceLoadNotifier function (cause of this crash).
Also pass a reference to the ResourceLoader instead of a raw pointer
to make it clear it cannot be null.
* Source/WebCore/loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::willSendRequest):
(WebCore::ResourceLoadNotifier::didReceiveResponse):
(WebCore::ResourceLoadNotifier::didReceiveData):
(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::didFailToLoad):
* Source/WebCore/loader/ResourceLoadNotifier.h:
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::didReceiveBuffer):
(WebCore::ResourceLoader::didFinishLoadingOnePart):
(WebCore::ResourceLoader::cleanupForError):
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
Canonical link: https://commits.webkit.org/291008@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list