You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
beforeunload seems not to be firing on iframe.src=... in several WPT html/webappapis/dynamic-markup-insertion/opening-the-input-stream tests #25098
#25094#25095#25096 all have some failures testing unload and pagehide events, but also time out as though beforeunload isn't even firing for them in the first place. In each case, the action that starts the unload process is assignment to the iframe's src.
#20329 looks like it added everything necessary for the beforeunload event to fire. I don't yet know how these cases are going around that code and reaching unload, and I'm going to try to find out.
Every single document.unload in this test is called from ScriptThread::handle_unload_document, not Window::Close, and so the beforeunload code from #20329 is not applied.
Upstream from ScriptThread::handle_unload_document is the ConstellationControlMsg::UnloadDocument message. This is sent from the chain of events that starts at HTMLIFrameElement::navigate_or_reload_child_browsing_context, which I don't understand well enough to diagnose anything about yet.
beforeunload should actually be firing much earlier; no network fetches should be initiated until after beforeunload has had a chance to fire and its return value has been examined. It seems to me like inside navigate_or_reload_child_browsing_context is a natural place to put it timing-wise, but I gather from IRC conversation with @jdm that there might be some complication about which origin/script thread can actually see the event at that time.
Activity
pshaughn commentedon Dec 22, 2019
#20329 looks like it added everything necessary for the beforeunload event to fire. I don't yet know how these cases are going around that code and reaching unload, and I'm going to try to find out.
pshaughn commentedon Dec 22, 2019
Every single document.unload in this test is called from ScriptThread::handle_unload_document, not Window::Close, and so the beforeunload code from #20329 is not applied.
Upstream from ScriptThread::handle_unload_document is the ConstellationControlMsg::UnloadDocument message. This is sent from the chain of events that starts at HTMLIFrameElement::navigate_or_reload_child_browsing_context, which I don't understand well enough to diagnose anything about yet.
pshaughn commentedon Jan 1, 2020
beforeunload should actually be firing much earlier; no network fetches should be initiated until after beforeunload has had a chance to fire and its return value has been examined. It seems to me like inside navigate_or_reload_child_browsing_context is a natural place to put it timing-wise, but I gather from IRC conversation with @jdm that there might be some complication about which origin/script thread can actually see the event at that time.