Bug 258167 - Check CachedResourceLoader's document WeakPtr in more places
Summary: Check CachedResourceLoader's document WeakPtr in more places
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-15 15:37 PDT by Brent Fulgham
Modified: 2023-06-16 16:22 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2023-06-15 15:37:52 PDT
The CachedResourceLoader class holds a WeakPtr to a Document, which may be nullptr at different moments in loading. We inconsistently check for nullptr, which telemetry shows is triggering some crashes.

This patch provides more rigorous checks for nullptr to avoid these crashes.
Comment 1 Brent Fulgham 2023-06-15 15:38:01 PDT
<rdar://106964279>
Comment 2 Brent Fulgham 2023-06-15 15:50:21 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15025
Comment 3 EWS 2023-06-16 16:22:18 PDT
Committed 265259@main (9632def06c0f): <https://commits.webkit.org/265259@main>

Reviewed commits have been landed. Closing PR #15025 and removing active labels.