Summary: | Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR). | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yongjun Zhang <yongjun_zhang> | ||||||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca, ap, barraclough, cdumez, commit-queue, ddkilzer, mitz, sam, thorton | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Yongjun Zhang
2015-06-29 16:26:37 PDT
Created attachment 255795 [details]
Patch.
Hmm, this fix could have the side effect of holding the web process too long if there is a long lasting XHR request. I need to work on a better fix. Update the title to reflect the real problem. Created attachment 255810 [details]
Patch v2.
Comment on attachment 255810 [details] Patch v2. View in context: https://bugs.webkit.org/attachment.cgi?id=255810&action=review > Source/WebKit2/UIProcess/WebPageProxy.h:821 > + void processWillBecomeForground(); "processWillBecomeForground" -> processWillBecomeForeground Comment on attachment 255810 [details]
Patch v2.
I don’t know which state transitions are possible. Is it a concern that the outcomes of the following transitions are different?
Foreground -> Suspended -> Background
Foreground -> Background
Is it a concern that this transition will fail to restore the state?
Foreground -> Suspended -> Background -> Suspended -> Foreground
(because on the second entry into Suspended, m_hasNetworkRequestsOnSuspended will change to false)
(In reply to comment #7) > Comment on attachment 255810 [details] > Patch v2. > > I don’t know which state transitions are possible. Is it a concern that the > outcomes of the following transitions are different? > Foreground -> Suspended -> Background > Foreground -> Background I could be wrong, but based on code inspection and my own test, I didn't find a scenario where the web process could go from Suspended to Background. > > Is it a concern that this transition will fail to restore the state? > Foreground -> Suspended -> Background -> Suspended -> Foreground > (because on the second entry into Suspended, m_hasNetworkRequestsOnSuspended > will change to false) Again, this ties to whether Suspended -> Background transition is possible. Thanks for the review! I will fix the typo on commit. Created attachment 255956 [details]
Patch for landing.
Comment on attachment 255956 [details] Patch for landing. Clearing flags on attachment: 255956 Committed r186200: <http://trac.webkit.org/changeset/186200> All reviewed patches have been landed. Closing bug. |