mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Mark promise creation methods with CanGc (#33928)
* Add CanGc annotations to promise constructor. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc arguments for Promise::new_in_current_realm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix out-of-order entries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from Promise::new. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Suppress clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
edc304854f
commit
575e885529
50 changed files with 422 additions and 221 deletions
|
@ -1939,7 +1939,7 @@ impl ScriptThread {
|
|||
},
|
||||
FromConstellation(ConstellationControlMsg::ExitFullScreen(id)) => self
|
||||
.profile_event(ScriptThreadEventCategory::ExitFullscreen, Some(id), || {
|
||||
self.handle_exit_fullscreen(id);
|
||||
self.handle_exit_fullscreen(id, can_gc);
|
||||
}),
|
||||
_ => {
|
||||
sequential.push(event);
|
||||
|
@ -2914,11 +2914,11 @@ impl ScriptThread {
|
|||
}
|
||||
|
||||
// exit_fullscreen creates a new JS promise object, so we need to have entered a realm
|
||||
fn handle_exit_fullscreen(&self, id: PipelineId) {
|
||||
fn handle_exit_fullscreen(&self, id: PipelineId, can_gc: CanGc) {
|
||||
let document = self.documents.borrow().find_document(id);
|
||||
if let Some(document) = document {
|
||||
let _ac = enter_realm(&*document);
|
||||
document.exit_fullscreen();
|
||||
document.exit_fullscreen(can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue