mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Various borrow hazard fixes (#33133)
* Reduce the scope of the document tag map borrow. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Reduce scope of borrow when finishing a Response. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Avoid creating a File object while borrowing FormData's data. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Prevent the GC from seeing an uninitialized window proxy slot. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
c00cd1326a
commit
bc5235827f
4 changed files with 16 additions and 12 deletions
|
@ -644,6 +644,9 @@ impl WindowProxy {
|
|||
// because we want to replace the wrapper's `ProxyTraps`, but we
|
||||
// don't want to update its identity.
|
||||
rooted!(in(*cx) let new_js_proxy = handler.new_window_proxy(&cx, window_jsobject));
|
||||
// Explicitly set this slot to a null pointer in case a GC occurs before we
|
||||
// are ready to set it to a real value.
|
||||
SetProxyReservedSlot(new_js_proxy.get(), 0, &PrivateValue(ptr::null_mut()));
|
||||
debug!(
|
||||
"Transplanting proxy from {:p} to {:p}.",
|
||||
old_js_proxy.get(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue