mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Add AsHandleValue trait to Heap<Value> and make Heap values rooted (#38024)
Encapsulates the unsafe conversion from Heap<Value> to HandleValue<'a>, and reducing repetitive unsafe code at call. fix #37258
This commit is contained in:
parent
9416251cab
commit
04ec710e60
17 changed files with 204 additions and 146 deletions
|
@ -166,7 +166,6 @@ impl Notification {
|
|||
) -> Self {
|
||||
// TODO: missing call to https://html.spec.whatwg.org/multipage/#structuredserializeforstorage
|
||||
// may be find in `dom/bindings/structuredclone.rs`
|
||||
let data = Heap::default();
|
||||
|
||||
let title = title.clone();
|
||||
let dir = options.dir;
|
||||
|
@ -234,7 +233,7 @@ impl Notification {
|
|||
serviceworker_registration: None,
|
||||
title,
|
||||
body,
|
||||
data,
|
||||
data: Heap::default(),
|
||||
dir,
|
||||
image,
|
||||
icon,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue