mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CanGc fixes in messageport.rs & workerglobalscope.rs (#34003)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
7ad8822d94
commit
fd6c100489
5 changed files with 7 additions and 6 deletions
|
@ -447,7 +447,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
|
|||
|
||||
impl WorkerGlobalScope {
|
||||
#[allow(unsafe_code)]
|
||||
pub fn execute_script(&self, source: DOMString) {
|
||||
pub fn execute_script(&self, source: DOMString, can_gc: CanGc) {
|
||||
let _aes = AutoEntryScript::new(self.upcast());
|
||||
let cx = self.runtime.borrow().as_ref().unwrap().cx();
|
||||
rooted!(in(cx) let mut rval = UndefinedValue());
|
||||
|
@ -468,7 +468,7 @@ impl WorkerGlobalScope {
|
|||
println!("evaluate_script failed");
|
||||
unsafe {
|
||||
let ar = enter_realm(self);
|
||||
report_pending_exception(cx, true, InRealm::Entered(&ar), CanGc::note());
|
||||
report_pending_exception(cx, true, InRealm::Entered(&ar), can_gc);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue