script: LoadBlocker's drop impl shouldn't run after termination.#36508
script: LoadBlocker's drop impl shouldn't run after termination.#36508mukilan merged 1 commit intoservo:mainfrom
LoadBlocker's drop impl shouldn't run after termination.#36508Conversation
|
Those were all tests that changed results in the original PR that you referenced. |
Ah, thanks for pointing that out! I looked into one of the tests - The test passes if we delete the I am not sure how this relates to the load blocker. I guess for now I can mark them as ERROR again and investigate these separately. |
|
Given that the load blocker is what controls when the onload event is dispatched, that definitely sounds suspicious! Please file a followup issue about it; there's no reason that the onload event should run before the inline script has a chance to define the run function. |
Agreed. I meant to say I couldn't find any obvious connection between this load blocker change and the onload event being triggered early in this specific case. I'll file the new issue. |
d5caade to
eac7211
Compare
|
The TIMEOUT in However, the CI test run has ALSA related errors that I don't see locally: |
|
This change does appear to make it timeout consistently on CI though. |
|
Does this test PASS for you locally? I've tried Ubuntu 24.04 and it consistently times out locally without the change (with |
|
I've been debugging this on the CI using my fork and some log statements The logs for a run with the current implementation of Based on those logs, I think I have a theory for why the test used to pass on CI without the change, but not with the change. Firstly, there is a difference between CI and local (at my Ubuntu 24.04 VM) media stack behaviour - for the Secondly, the bug introduced in #34122 meant that |
|
I added some more logs for the CI run https://github.com/mukilan/servo/actions/runs/14567332667/job/40859369808 The theory above is essentially correct, with one minor clarification. The servo/components/script/dom/htmlmediaelement.rs Line 1891 in 7ee9d07 means we need a PlayerEvent::StateChanged event to also be delivered after a MetadataUpdated event so that the media is in the correct state, but this doesn't happen for .wav media.
It is not clear to me if this is a bug in the media stack or the assumption in the code about the order of events from the media stack. The spec states
So it looks like the code is correct in not clearing the delay-the-load-event-flag when |
That sounds totally reasonable! Thanks for the detailed investigation. |
The logic in LoadBlocker::terminate was modified in servo#34122 to `clone` the LoadBlocker's inner `load` member instead of `take`ing it. However, this member serves as a flag so that `LoadBlocker`'s Drop impl can avoid calling `doc.finish_load` on already terminated loads. The change in unnecessary 'unknown completed load' warnings when Servo is run with logging enabled. This patch also updates the expectations for tests which started passing after the change in servo#34122, but now fail again with this change. These test failures will be investigated in servo#36561. Signed-off-by: Mukilan Thiyagarajan <[email protected]>
eac7211 to
8180292
Compare
The logic in LoadBlocker::terminate was modified in #34122 to
clonethe LoadBlocker's inner
loadmember instead oftakeing it. However,this member serves as a flag so that
LoadBlocker's Drop impl can avoidcalling
doc.finish_loadon already terminated loads. The change results inunnecessary 'unknown completed load' warnings when Servo is run with
logging enabled.
Signed-off-by: Mukilan Thiyagarajan [email protected]