mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix double-panic when the script task panics.
This commit is contained in:
parent
b1a35f549b
commit
48b151948f
3 changed files with 18 additions and 12 deletions
|
@ -91,6 +91,12 @@ impl<T: Reflectable> Unrooted<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create a new unrooted value from a `Temporary<T>`.
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn from_temporary(ptr: Temporary<T>) -> Unrooted<T> {
|
||||
Unrooted::from_js(ptr.inner)
|
||||
}
|
||||
|
||||
/// Get the `Reflector` for this pointer.
|
||||
pub fn reflector<'a>(&'a self) -> &'a Reflector {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue