Bug 308679
| Summary: | [Site Isolation] WebFrame::url() returns null in dispatchDidCommitLoad during process swap. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <basuke> |
| Component: | New Bugs | Assignee: | Basuke Suzuki <basuke> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Basuke Suzuki
In dispatchDidCommitLoad, commitProvisionalFrame() is called after the InjectedBundle and sandbox extension callbacks. Before that call, m_coreFrame still points to a RemoteFrame, so WebFrame::url() fails the LocalFrame downcast and returns a null URL.
Move commitProvisionalFrame() to the top of dispatchDidCommitLoad so m_coreFrame is updated before any code that depends on it. This is safe for the non-Site-Isolation path because commitProvisionalFrame() is a no-op when there is no provisional frame.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
rdar://169559232
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/59525
EWS
Committed 308382@main (726af0edf132): <https://commits.webkit.org/308382@main>
Reviewed commits have been landed. Closing PR #59525 and removing active labels.