Bug 180885 - Plugin processes are repeatedly spun up to do nothing
Summary: Plugin processes are repeatedly spun up to do nothing
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2017-12-15 14:49 PST by Brent Fulgham
Modified: 2017-12-16 09:57 PST (History)
6 users (show)

See Also:

Patch (1.32 KB, patch)
2017-12-15 15:10 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (3.21 KB, patch)
2017-12-15 16:34 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 2017-12-15 14:49:03 PST
The code in 'WebsiteDataStore::removeData' calls State::deleteData, even if there are no hostnames with data to be deleted.

This causes a PluginProcess to be spun up for each plugin type, which is told to delete data from no websites. The processes then shut down.

We shouldn't be doing this.
Comment 1 Radar WebKit Bug Importer 2017-12-15 14:50:53 PST
Comment 2 Brent Fulgham 2017-12-15 15:07:08 PST
I noticed this problem while doing further debugging and testing after the changes for Bug 180819. However, this bug existed before then.
Comment 3 Brent Fulgham 2017-12-15 15:10:02 PST
Created attachment 329523 [details]
Comment 4 Brent Fulgham 2017-12-15 15:11:23 PST
Another fix might be to have State::deleteData() return early if hostNames or plugins is empty.
Comment 5 Brent Fulgham 2017-12-15 15:14:44 PST
Yikes! That has been that way since 2015!
Comment 6 Geoffrey Garen 2017-12-15 15:15:55 PST
Comment on attachment 329523 [details]

Comment 7 Geoffrey Garen 2017-12-15 15:18:22 PST
Can we API test this? Seems like the kind of subtle mistake that might happen again.
Comment 8 Brent Fulgham 2017-12-15 16:34:10 PST
Created attachment 329538 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2017-12-16 09:57:13 PST
Comment on attachment 329538 [details]
Patch for landing

Clearing flags on attachment: 329538

Committed r225999: <https://trac.webkit.org/changeset/225999>
Comment 10 WebKit Commit Bot 2017-12-16 09:57:14 PST
All reviewed patches have been landed.  Closing bug.