mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make use of RefCell::try_borrow_unguarded
This commit is contained in:
parent
a74f5222db
commit
44163148c2
7 changed files with 11 additions and 8 deletions
|
@ -26,7 +26,9 @@ impl<T> DomRefCell<T> {
|
|||
#[allow(unsafe_code)]
|
||||
pub unsafe fn borrow_for_layout(&self) -> &T {
|
||||
debug_assert!(thread_state::get().is_layout());
|
||||
&*self.value.as_ptr()
|
||||
self.value
|
||||
.try_borrow_unguarded()
|
||||
.expect("cell is mutably borrowed")
|
||||
}
|
||||
|
||||
/// Borrow the contents for the purpose of script deallocation.
|
||||
|
|
|
@ -1442,8 +1442,6 @@ impl XMLHttpRequest {
|
|||
|
||||
fn filter_response_headers(&self) -> HeaderMap {
|
||||
// https://fetch.spec.whatwg.org/#concept-response-header-list
|
||||
use http::header::{self, HeaderName};
|
||||
|
||||
let mut headers = self.response_headers.borrow().clone();
|
||||
headers.remove(header::SET_COOKIE);
|
||||
headers.remove(HeaderName::from_static("set-cookie2"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue