script: Move devtools_wants_updates from GlobalScope to Window (#44121)

Moved devtools_wants_updates from GlobalScope to Window

Testing: Compiles cleanly. ```./mach test-devtools``` gives different
results each time, ```./mach test-devtools
test_sources_list_with_data_inline_classic_script``` always pass though.
Fixes: #44106

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: Abbas Olanrewaju Sarafa <109840351+sabbCodes@users.noreply.github.com>
This commit is contained in:
Abbas Olanrewaju Sarafa
2026-04-12 06:36:59 +01:00
committed by GitHub
parent 45972e07ab
commit 040aa2a3a5
6 changed files with 22 additions and 28 deletions

View File

@@ -2189,9 +2189,7 @@ impl ScriptThread {
DevtoolScriptControlMsg::WantsLiveNotifications(id, to_send) => {
match documents.find_window(id) {
Some(window) => {
window
.upcast::<GlobalScope>()
.set_devtools_wants_updates(to_send);
window.set_devtools_wants_updates(to_send);
},
None => warn!("Message sent to closed pipeline {}.", id),
}
@@ -4130,8 +4128,8 @@ impl ScriptThread {
return;
};
if let Some(global) = self.documents.borrow().find_global(pipeline_id) {
if global.live_devtools_updates() {
if let Some(window) = self.documents.borrow().find_window(pipeline_id) {
if window.live_devtools_updates() {
let css_error = CSSError {
filename,
line,