Summary: | ProcessAssertion shouldn't keep UI app runnable if BKSProcessAssertion is invalid | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> | ||||||
Component: | WebKit2 | Assignee: | Gavin Barraclough <barraclough> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 159280 | ||||||||
Attachments: |
|
Description
Gavin Barraclough
2016-06-29 16:29:02 PDT
Created attachment 282391 [details]
WIP
Comment on attachment 282391 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282391&action=review > Source/WebKit2/UIProcess/ProcessAssertion.h:61 > + bool isValid(); Could be const? > Source/WebKit2/UIProcess/ProcessAssertion.h:85 > + bool m_isHoldingBackgroundAssertionOnApp : false; { false } Also, do we need the "OnApp" suffix? > Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:177 > + return m_assertion->valid; m_assertion.get().valid Comment on attachment 282391 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282391&action=review >> Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:177 >> + return m_assertion->valid; > > m_assertion.get().valid Also, for this to build with public SDK, I think we'll need to add the following to BKSProcessAssertion @interface in ApplicationServicesSPI.h: @property (nonatomic, readonly) BOOL valid; Comment on attachment 282391 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282391&action=review >>> Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:177 >>> + return m_assertion->valid; >> >> m_assertion.get().valid > > Also, for this to build with public SDK, I think we'll need to add the following to BKSProcessAssertion @interface in ApplicationServicesSPI.h: > @property (nonatomic, readonly) BOOL valid; Unfortunately, this causes some problems because valid is false until the assertion is actually acquired. Comment on attachment 282391 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282391&action=review >>>> Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:177 >>>> + return m_assertion->valid; >>> >>> m_assertion.get().valid >> >> Also, for this to build with public SDK, I think we'll need to add the following to BKSProcessAssertion @interface in ApplicationServicesSPI.h: >> @property (nonatomic, readonly) BOOL valid; > > Unfortunately, this causes some problems because valid is false until the assertion is actually acquired. In particular, isValid() always returns false when updateRunInBackgroundCount() is called from the ProcessAndUIAssertion() constructor. Created attachment 282450 [details]
Fix
Comment on attachment 282450 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=282450&action=review r=me > Source/WebKit2/ChangeLog:3 > + ProcessAssertion shouldn't keep UI app runnable if BKSProcessAssertion is invalid Maybe we want to update the title given the smaller scope of the change now? > Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:181 > + if (m_isHoldingBackgroundAssertion && !shouldHoldBackgroundAssertion) else if ? Committed revision 202690. |