mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CanGc fixes in errorevent.rs
(#33960)
* CanGc fixes in errorevent.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Allow too_many_arguments to avoid lint error Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
575e885529
commit
7015e0fb5f
21 changed files with 79 additions and 51 deletions
|
@ -27,7 +27,7 @@ use crate::dom::paintworkletglobalscope::{PaintWorkletGlobalScope, PaintWorkletT
|
|||
use crate::dom::testworkletglobalscope::{TestWorkletGlobalScope, TestWorkletTask};
|
||||
use crate::dom::worklet::WorkletExecutor;
|
||||
use crate::script_module::ScriptFetchOptions;
|
||||
use crate::script_runtime::JSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
use crate::script_thread::MainThreadScriptMsg;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -114,7 +114,7 @@ impl WorkletGlobalScope {
|
|||
}
|
||||
|
||||
/// Evaluate a JS script in this global.
|
||||
pub fn evaluate_js(&self, script: &str) -> bool {
|
||||
pub fn evaluate_js(&self, script: &str, can_gc: CanGc) -> bool {
|
||||
debug!("Evaluating Dom in a worklet.");
|
||||
rooted!(in (*GlobalScope::get_cx()) let mut rval = UndefinedValue());
|
||||
self.globalscope.evaluate_js_on_global_with_result(
|
||||
|
@ -122,6 +122,7 @@ impl WorkletGlobalScope {
|
|||
rval.handle_mut(),
|
||||
ScriptFetchOptions::default_classic_script(&self.globalscope),
|
||||
self.globalscope.api_base_url(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue