Summary: | Reloading a view in its processTerminationHandler does not work reliably when using related views | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, beidson, bugs-noreply, ggaren, mcatanzaro, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | 222011, 222809 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Chris Dumez
2020-10-06 15:13:09 PDT
Created attachment 410702 [details]
Patch
Comment on attachment 410702 [details]
Patch
r=me
Created attachment 410703 [details]
Patch
Committed r268097: <https://trac.webkit.org/changeset/268097> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410703 [details]. This introduced a regression in Epiphany. Previously, our web-process-terminated signal handler checked the URI of the web view to decide which page to reload. The Reload button in our crash page is hooked up to some JS that sets window.location to this URI. But since this commit, the web view changes its URI to an empty string before it emits web-process-terminated. So now when users click the Reload button, nothing happens. It's very easy to work around in Epiphany: we could simply remember the last non-empty URL and use that when loading the crash page. That's a bit messy, but it seems better than going back to synchronous loading that doesn't work properly for related views. But I wouldn't be surprised if other WebKit clients might be broken in the same way. Hm, even vanilla reload() cannot work anymore, because it would only reload an empty address and wind up with about:blank. So although we *can* work around this in the client, I'm not sure we should, because it seems like all clients would be affected. (Are you sure this didn't break Safari?) (In reply to Michael Catanzaro from comment #7) > Hm, even vanilla reload() cannot work anymore, because it would only reload > an empty address and wind up with about:blank. So although we *can* work > around this in the client, I'm not sure we should, because it seems like all > clients would be affected. (Are you sure this didn't break Safari?) It did break Safari iirc and we fixed Safari. OK, my proposed Epiphany fix is https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/913 (In reply to Michael Catanzaro from comment #9) > OK, my proposed Epiphany fix is > https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/913 BTW, I would expect reload() to work. As a matter of fact, this is what WebKit's default crash handler does (when the client does not set a custom crash handler). That doesn't work on its own because before we can reload(), we have to do webkit_web_view_load_alternate_html(), and then whatever URI we pass to that is what will get reloaded. So we need to track the previous nonempty URI regardless, or we'll just wind up reloading an empty string. (In reply to Michael Catanzaro from comment #11) > That doesn't work on its own because before we can reload(), we have to do > webkit_web_view_load_alternate_html(), and then whatever URI we pass to that > is what will get reloaded. So we need to track the previous nonempty URI > regardless, or we'll just wind up reloading an empty string. I see. I agree this is risky. I will see if I can find a better way to fix this. (In reply to Chris Dumez from comment #12) > (In reply to Michael Catanzaro from comment #11) > > That doesn't work on its own because before we can reload(), we have to do > > webkit_web_view_load_alternate_html(), and then whatever URI we pass to that > > is what will get reloaded. So we need to track the previous nonempty URI > > regardless, or we'll just wind up reloading an empty string. > > I see. I agree this is risky. I will see if I can find a better way to fix > this. Fixing via Bug 222011. Ah cool, thanks. |