mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
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:
committed by
GitHub
parent
45972e07ab
commit
040aa2a3a5
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user