Bug 193985 - Make sure we have a frame before trying to access its loader
Summary: Make sure we have a frame before trying to access its loader
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-29 14:58 PST by Brent Fulgham
Modified: 2019-01-29 17:42 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2019-01-29 15:16 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-01-29 14:58:01 PST
Early seeding of iOS 12.2 showed some nullptr dereferences in 'ResourceLoadObserver::logUserInteractionWithReducedTimeResolution'. Code inspection and review of the backtraces reveal that the code attempts to access the frame's loader, even if the frame is a nullptr.

We check for null frames in other uses of the document frame member, so should do so here as well.
Comment 1 Brent Fulgham 2019-01-29 14:58:17 PST
<rdar://problem/47618239>
Comment 2 Brent Fulgham 2019-01-29 15:16:59 PST
Created attachment 360506 [details]
Patch
Comment 3 John Wilander 2019-01-29 15:20:10 PST
Comment on attachment 360506 [details]
Patch

LGTM.
Comment 4 WebKit Commit Bot 2019-01-29 17:42:55 PST
Comment on attachment 360506 [details]
Patch

Clearing flags on attachment: 360506

Committed r240697: <https://trac.webkit.org/changeset/240697>
Comment 5 WebKit Commit Bot 2019-01-29 17:42:56 PST
All reviewed patches have been landed.  Closing bug.