From b4643c1f11d1929c715f38cdf1bdd32559bc9fdf Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Tue, 19 Nov 2024 16:36:55 +0100 Subject: [PATCH] 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 Co-authored-by: Mukilan Thiyagarajan --- components/script/script_thread.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 0057a86d872..ff066eda0c9 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -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