| Summary: | Simplify process suppression state calculation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> | ||||
| Component: | WebKit2 | Assignee: | Gavin Barraclough <barraclough> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | ||||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Gavin Barraclough
2014-01-03 17:00:39 PST
Created attachment 220358 [details]
Fix
Comment on attachment 220358 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=220358&action=review > ../OpenSource/Source/WebKit2/UIProcess/WebPageProxy.cpp:520 > + return m_viewState & ViewState::IsVisuallyIdle && m_pageGroup->preferences()->pageVisibilityBasedProcessSuppressionEnabled(); Feels like this should have parens to indicate associativity. > ../OpenSource/Source/WebKit2/UIProcess/mac/WebContextMac.mm:391 > + for (const auto& context : WebContext::allContexts()) { Why does this loop use "const auto&" while the other uses "auto*"? Comment on attachment 220358 [details]
Fix
Since allContexts() is a vector of WebContext*, and since the range-based for loops do not intend to modify the contents of the vector, I think they should both just say "auto" -- neither "auto*" nor "const auto&".
Comment on attachment 220358 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=220358&action=review r=me as well. >> ../OpenSource/Source/WebKit2/UIProcess/mac/WebContextMac.mm:391 >> + for (const auto& context : WebContext::allContexts()) { > > Why does this loop use "const auto&" while the other uses "auto*"? This should use auto*. Committed revision 161301. |