| Summary: | Update SPI for managing tabs | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> | ||||
| Component: | WebKit2 | Assignee: | Gavin Barraclough <barraclough> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aestes, ap, mitz | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 131860 | ||||||
| Attachments: |
|
||||||
|
Description
Gavin Barraclough
2014-04-09 14:26:25 PDT
Created attachment 228983 [details]
Fix
Comment on attachment 228983 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=228983&action=review Python script changes in the patch seem unrelated. > Source/WebKit2/UIProcess/WebProcessProxy.h:226 > + bool m_foreground; I think that "m_assertionFlagsAreForeground" would be a more descriptive name for this. Or perhaps we can ask m_assertion about whether it's taken? > Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm:35 > +#define BACKGROUND_TAB_FLAGS (BKSProcessAssertionAllowIdleSleep) > +#define FOREGROUND_TAB_FLAGS (BKSProcessAssertionAllowIdleSleep | BKSProcessAssertionPreventTaskSuspend | BKSProcessAssertionWantsForegroundResourcePriority | BKSProcessAssertionPreventTaskThrottleDown) I'd use a const, not a #define. > Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm:100 > + LOG_ERROR("Unable to aquire assertion for WebContent process %d", pid); Typo: aquire. > Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm:104 > + m_assertion = [[BKSProcessAssertion alloc] initWithPID:pid flags:flags reason:BKSProcessAssertionReasonExtension name:@"Web content visible" withHandler:handler]; This leaks, please use adoptNS(). Transmitting file data .... Committed revision 167039. (In reply to comment #2) > (From update of attachment 228983 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=228983&action=review > > Python script changes in the patch seem unrelated. > > > Source/WebKit2/UIProcess/WebProcessProxy.h:226 > > + bool m_foreground; > > I think that "m_assertionFlagsAreForeground" would be a more descriptive name for this. > > Or perhaps we can ask m_assertion about whether it's taken? > > > Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm:35 > > +#define BACKGROUND_TAB_FLAGS (BKSProcessAssertionAllowIdleSleep) > > +#define FOREGROUND_TAB_FLAGS (BKSProcessAssertionAllowIdleSleep | BKSProcessAssertionPreventTaskSuspend | BKSProcessAssertionWantsForegroundResourcePriority | BKSProcessAssertionPreventTaskThrottleDown) > > I'd use a const, not a #define. …and constants should be named like local variables, starting with a lowercase letter. |