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:
Diego Marcos 2015-01-26 15:27:47 -08:00
parent 648b4991b9
commit 7b9c902a0a
4 changed files with 17 additions and 10 deletions

View file

@ -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()
}