Bug 157412 - Don't use invalidated ResourceLoadStatistics iterators
Summary: Don't use invalidated ResourceLoadStatistics iterators
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: 2016-05-05 20:54 PDT by Brent Fulgham
Modified: 2016-05-06 08:52 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.43 KB, patch)
2016-05-05 21:07 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (3.44 KB, patch)
2016-05-05 21:13 PDT, Brent Fulgham
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2016-05-05 20:54:05 PDT
We were using references bound to the return value of iterators from the ResourceLoadStatistics HashMap. When new entries were added, these iterators were invalidated causing the references to refer to invalid memory.
Comment 1 Radar WebKit Bug Importer 2016-05-05 20:54:58 PDT
<rdar://problem/26133153>
Comment 2 Brent Fulgham 2016-05-05 21:07:40 PDT
Created attachment 278231 [details]
Patch
Comment 3 Brent Fulgham 2016-05-05 21:13:04 PDT
Created attachment 278232 [details]
Patch
Comment 4 Chris Dumez 2016-05-06 08:43:57 PDT
Comment on attachment 278232 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=278232&action=review

r=me

> Source/WebCore/loader/ResourceLoadStatisticsStore.cpp:71
> +    m_resourceStatisticsMap.set(primaryDomain, statistics);

WTFMove(statistics) ?
Comment 5 Brent Fulgham 2016-05-06 08:52:27 PDT
Committed r200511: <http://trac.webkit.org/changeset/200511>