mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Modify ModuleObject::handle() to return a handle with a lifetime (#42071)
Changed the return type of `ModuleObject::handle()` to the original type of its contained handle by removing `.into()` call, as requested in the linked issue. Additional changes are due to temporary borrows now sharing lifetime with returned handle reference. Testing: No new tests needed, as the code is functionally the same after the changes. Verified with running `./mach test-build` and `./mach test-unit` successfully. Fixes: https://github.com/servo/servo/issues/42051 Signed-off-by: Krzysztof Biedroń <arkendil@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e040960366
commit
17e3061ecd
@@ -1060,8 +1060,7 @@ impl HTMLScriptElement {
|
||||
|
||||
if let Some(record) = record {
|
||||
rooted!(in(*GlobalScope::get_cx()) let mut rval = UndefinedValue());
|
||||
let evaluated =
|
||||
module_tree.execute_module(global, record, rval.handle_mut().into(), can_gc);
|
||||
let evaluated = module_tree.execute_module(global, record, rval.handle_mut(), can_gc);
|
||||
|
||||
if let Err(exception) = evaluated {
|
||||
module_tree.set_rethrow_error(exception);
|
||||
|
||||
Reference in New Issue
Block a user