#46716·servo

在 KeyframeEffect::GetKeyframes 中借用风险

作者: jdm创建于 2026年7月22日更新于 2026年9月30日
标签A-content/cssE-less-complexI-panic

error[E0502]: cannot borrow *cx as mutable because it is also borrowed as immutable --> components/script/dom/animations/keyframeeffect.rs:174:64 | 145 | let mut layout = self.window.layout_mut2(cx.no_gc()); | -- immutable borrow occurs here ... 174 | rooted!(&in(cx) let mut output_keyframe = unsafe { JS_NewObject(cx, ptr::null()) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here ... 240 | …