mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: LoadBlocker
's drop impl shouldn't run after termination. (#36508)
The logic in LoadBlocker::terminate was modified in #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 results in unnecessary 'unknown completed load' warnings when Servo is run with logging enabled. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
6bb087e381
commit
2a723a528c
7 changed files with 29 additions and 3 deletions
|
@ -50,10 +50,18 @@ impl LoadBlocker {
|
|||
|
||||
/// Remove this load from the associated document's list of blocking loads.
|
||||
pub(crate) fn terminate(blocker: &DomRefCell<Option<LoadBlocker>>, can_gc: CanGc) {
|
||||
if let Some(this) = blocker.borrow().as_ref() {
|
||||
let load_data = this.load.clone().unwrap();
|
||||
this.doc.finish_load(load_data, can_gc);
|
||||
let Some(load) = blocker
|
||||
.borrow_mut()
|
||||
.as_mut()
|
||||
.and_then(|blocker| blocker.load.take())
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
if let Some(blocker) = blocker.borrow().as_ref() {
|
||||
blocker.doc.finish_load(load, can_gc);
|
||||
}
|
||||
|
||||
*blocker.borrow_mut() = None;
|
||||
}
|
||||
}
|
||||
|
|
3
tests/wpt/meta/dom/ranges/Range-cloneContents.html.ini
vendored
Normal file
3
tests/wpt/meta/dom/ranges/Range-cloneContents.html.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Range-cloneContents.html]
|
||||
bug: https://github.com/servo/servo/issues/36561
|
||||
expected: ERROR
|
3
tests/wpt/meta/dom/ranges/Range-deleteContents.html.ini
vendored
Normal file
3
tests/wpt/meta/dom/ranges/Range-deleteContents.html.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Range-deleteContents.html]
|
||||
bug: https://github.com/servo/servo/issues/36561
|
||||
expected: ERROR
|
3
tests/wpt/meta/dom/ranges/Range-extractContents.html.ini
vendored
Normal file
3
tests/wpt/meta/dom/ranges/Range-extractContents.html.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Range-extractContents.html]
|
||||
bug: https://github.com/servo/servo/issues/36561
|
||||
expected: ERROR
|
3
tests/wpt/meta/dom/ranges/Range-insertNode.html.ini
vendored
Normal file
3
tests/wpt/meta/dom/ranges/Range-insertNode.html.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Range-insertNode.html]
|
||||
bug: https://github.com/servo/servo/issues/36561
|
||||
expected: ERROR
|
3
tests/wpt/meta/dom/ranges/Range-surroundContents.html.ini
vendored
Normal file
3
tests/wpt/meta/dom/ranges/Range-surroundContents.html.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Range-surroundContents.html]
|
||||
bug: https://github.com/servo/servo/issues/36561
|
||||
expected: ERROR
|
3
tests/wpt/meta/mimesniff/media/media-sniff.window.js.ini
vendored
Normal file
3
tests/wpt/meta/mimesniff/media/media-sniff.window.js.ini
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[media-sniff.window.html]
|
||||
bug: https://github.com/servo/servo/issues/36626
|
||||
expected: TIMEOUT
|
Loading…
Add table
Add a link
Reference in a new issue