| Summary: | Clean up ProcessThrottler | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> | ||||
| Component: | WebKit2 | Assignee: | Gavin Barraclough <barraclough> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Gavin Barraclough
2014-05-02 23:24:21 PDT
Created attachment 230749 [details]
Fix
Attachment 230749 [details] did not pass style-queue:
ERROR: Source/WebKit2/UIProcess/ios/ProcessThrottler.h:60: The parameter name "process" adds no information, so it should be removed. [readability/parameter_name] [5]
Total errors found: 1 in 15 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 230749 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=230749&action=review r=me, but I might have found a bug. > Source/WebKit2/ChangeLog:21 > + longer needs request a reply from SetViewState, and WebPageProxy can lose all the 'hiding' "needs to" > Source/WebKit2/UIProcess/WebPageProxy.cpp:1101 > + else if (!m_activityToken) > + m_activityToken = std::make_unique<ProcessThrottler::ForegroundActivityToken>(m_process->throttler()); If I already have an activity token, but it is Background instead of Foreground, won't this !m_activityToken check prevent me from entering the Foreground state when I should? Seems like you should check !m_activityToken || m_activityToken->isBackgroundActivityToken() or something. (In reply to comment #3) > (From update of attachment 230749 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=230749&action=review > > r=me, but I might have found a bug. > > > Source/WebKit2/ChangeLog:21 > > + longer needs request a reply from SetViewState, and WebPageProxy can lose all the 'hiding' > > "needs to" > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1101 > > + else if (!m_activityToken) > > + m_activityToken = std::make_unique<ProcessThrottler::ForegroundActivityToken>(m_process->throttler()); > > If I already have an activity token, but it is Background instead of Foreground, won't this !m_activityToken check prevent me from entering the Foreground state when I should? > > Seems like you should check !m_activityToken || m_activityToken->isBackgroundActivityToken() or something. No – the WebPageProxy no longer has to know about keeping the page running the background state – that is now all invisible to it. WebPageProxy simply takes a ForegroundActivityToken when the page is visible, and releases it when the page is hidden. The ProcessThrottler is now responsible for transitioning from Foreground to Suspended via a Background state. Transmitting file data ............... Committed revision 168312. |