mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Adds borrow_for_script_deallocation and unsafe_mut_js_info method to avoid 'DOMRefCell already mutably borrowed' messages. This is just a temporary fix until the Rust standard library allows borrowing already-borrowed RefCell values during unwinding.
It also removes LiveDOMReferences destructor that it's a no-op but it contains an assert that was being violated causing an endless cycle of destructor calls ending up in a stack overflow.
This commit is contained in:
parent
648b4991b9
commit
7b9c902a0a
4 changed files with 17 additions and 10 deletions
|
@ -273,6 +273,10 @@ impl Page {
|
|||
self.js_info.borrow_mut()
|
||||
}
|
||||
|
||||
pub unsafe fn unsafe_mut_js_info<'a>(&'a self) -> &'a mut Option<JSPageInfo> {
|
||||
self.js_info.borrow_for_script_deallocation()
|
||||
}
|
||||
|
||||
pub fn js_info<'a>(&'a self) -> Ref<'a, Option<JSPageInfo>> {
|
||||
self.js_info.borrow()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue