Bug 170324

Summary: Resource Load Statistics: Check if the store exists before clearing it
Product: WebKit Reporter: John Wilander <wilander>
Component: WebCore Misc.Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, buildbot, cdumez, commit-queue, dbates, japhet, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

John Wilander
Reported 2017-03-30 20:16:33 PDT
Non-web clients may delete website data records. In such cases the shared observer will not have a store to clear so we should check that it exists.
Attachments
Patch (1.40 KB, patch)
2017-03-30 20:20 PDT, John Wilander
no flags
John Wilander
Comment 1 2017-03-30 20:16:56 PDT
John Wilander
Comment 2 2017-03-30 20:20:40 PDT
Brent Fulgham
Comment 3 2017-03-31 09:04:17 PDT
Comment on attachment 305940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=305940&action=review r=me > Source/WebCore/loader/ResourceLoadObserver.cpp:74 > + m_store->clearInMemoryAndPersistent(); We should audit the code for other cases like this, since we now realize there are other WK2 clients that are not browsers.
John Wilander
Comment 4 2017-03-31 09:24:33 PDT
(In reply to Brent Fulgham from comment #3) > Comment on attachment 305940 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=305940&action=review > > r=me Thanks! > > Source/WebCore/loader/ResourceLoadObserver.cpp:74 > > + m_store->clearInMemoryAndPersistent(); > > We should audit the code for other cases like this, since we now realize > there are other WK2 clients that are not browsers. Agreed. The root cause is the static sharedObserver() getter which anyone can call, no matter how they’ve set up the WebsiteDataStore. I'll land this and take another look.
WebKit Commit Bot
Comment 5 2017-03-31 09:54:44 PDT
Comment on attachment 305940 [details] Patch Clearing flags on attachment: 305940 Committed r214669: <http://trac.webkit.org/changeset/214669>
WebKit Commit Bot
Comment 6 2017-03-31 09:54:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.