script: Remove a warning about a common situation involving OOP iframes (#34288)

When an iframe is out of process or running in a different
`ScriptThread`, it is expected that their `Document`s cannot be found in
the current `ScriptThread` during the *update-the-rendering* step.
Remove the warning in that situation and add a comment instead.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Martin Robinson 2024-11-19 16:36:55 +01:00 committed by GitHub
parent 0eda2de19f
commit b4643c1f11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1620,8 +1620,11 @@ impl ScriptThread {
// Note: the spec reads: "for doc in docs" at each step
// whereas this runs all steps per doc in docs.
for pipeline_id in pipelines_to_update {
// This document is not managed by this script thread. This can happen is the pipeline is
// unexpectedly closed or simply that it is managed by a different script thread.
// TODO: It would be better if iframes knew whether or not their Document was managed
// by the same script thread.
let Some(document) = self.documents.borrow().find_document(pipeline_id) else {
warn!("Updating the rendering for closed pipeline {pipeline_id}.");
continue;
};
// TODO(#32004): The rendering should be updated according parent and shadow root order