зеркало из https://github.com/mozilla/gecko-dev.git
b68275373e
Per spec, whenever a "beforeunload" event handler which would affect a `location.reload()` call exists, it must be called before the `reload()` call returns. If a handler requests to block the navigation and we choose to display a confirmation prompt, that must also be displayed before the call returns. With session history in parent, though, that currently does not happen, because `location.reload()` triggers an async IPC call to the parent process, and only attempts the actual reload (and thus beforeunload dispatch and prompting) once it returns, which is too late to affect the caller. This patch changes the handling in this case to manually perform permit unload checks before taking an async code path. This still leaves the opportunity for session history handlers in the parent to cancel the load asynchronously, but that doesn't violate any spec-defined behavior. Differential Revision: https://phabricator.services.mozilla.com/D94354 |
||
---|---|---|
.. | ||
base | ||
build | ||
resources/content | ||
shistory | ||
test | ||
moz.build |