mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -6,7 +6,7 @@ use std::rc::Rc;
|
|||
|
||||
use constellation_traits::ScriptToConstellationMessage;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::Heap;
|
||||
use js::jsapi::HandleObject;
|
||||
use webgpu_traits::WebGPUAdapterResponse;
|
||||
use wgpu_types::PowerPreference;
|
||||
|
||||
|
@ -117,7 +117,7 @@ impl RoutedPromiseListener<WebGPUAdapterResponse> for GPU {
|
|||
"{} ({:?})",
|
||||
adapter.adapter_info.name, adapter.adapter_id.0
|
||||
)),
|
||||
Heap::default(),
|
||||
HandleObject::null(),
|
||||
adapter.features,
|
||||
adapter.limits,
|
||||
adapter.adapter_info,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue