mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add unrooted_must_root lint for usages of JS<T> in let/for bindings
This commit is contained in:
parent
12dc54d238
commit
bded5c3703
11 changed files with 55 additions and 15 deletions
|
@ -139,6 +139,7 @@ pub struct CallSetup {
|
|||
|
||||
impl CallSetup {
|
||||
/// Performs the setup needed to make a call.
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
|
||||
let global = global_object_for_js_object(callback.callback());
|
||||
let global = global.root();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue