Bug 174234 - Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
Summary: Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadO...
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: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 19:54 PDT by Chris Dumez
Modified: 2017-07-06 21:15 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.96 KB, patch)
2017-07-06 20:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-07-06 19:54:58 PDT
Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is always 0 since this member is only initialized later on, in the UIProcess.
Comment 1 Chris Dumez 2017-07-06 20:14:29 PDT
Created attachment 314800 [details]
Patch
Comment 2 Brent Fulgham 2017-07-06 20:40:43 PDT
Comment on attachment 314800 [details]
Patch

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

Much tidier. Thank you for cleaning this up!

> Source/WebCore/loader/ResourceLoadObserver.cpp:146
>      {

Do we need this scope? I think it might have been here to support locking, which we don't do anymore.
Comment 3 Chris Dumez 2017-07-06 20:41:54 PDT
Comment on attachment 314800 [details]
Patch

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

>> Source/WebCore/loader/ResourceLoadObserver.cpp:146
>>      {
> 
> Do we need this scope? I think it might have been here to support locking, which we don't do anymore.

I added it to make sure people do not use targetStatistics later on in this function since the reference gets invalidated by the later call to ensureResourceStatisticsForPrimaryDomain() in this function.
Comment 4 WebKit Commit Bot 2017-07-06 21:15:12 PDT
Comment on attachment 314800 [details]
Patch

Clearing flags on attachment: 314800

Committed r219236: <http://trac.webkit.org/changeset/219236>
Comment 5 WebKit Commit Bot 2017-07-06 21:15:14 PDT
All reviewed patches have been landed.  Closing bug.