Bug 174234

Summary: Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, buildbot, commit-queue, dbates, japhet, wilander
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.