mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Modify *::get_cx methods to return a safe JSContext instead of a raw one
This commit is contained in:
parent
2c5d0a6ebc
commit
88cacfb009
43 changed files with 306 additions and 321 deletions
|
@ -45,10 +45,10 @@ impl VREyeParameters {
|
|||
let fov = VRFieldOfView::new(&global, parameters.field_of_view.clone());
|
||||
|
||||
let cx = global.get_cx();
|
||||
rooted!(in (cx) let mut array = ptr::null_mut::<JSObject>());
|
||||
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
|
||||
unsafe {
|
||||
let _ = Float32Array::create(
|
||||
cx,
|
||||
*cx,
|
||||
CreateWith::Slice(¶meters.offset),
|
||||
array.handle_mut(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue