mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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
|
@ -57,10 +57,10 @@ impl XRViewerPose {
|
|||
XRViewerPoseBinding::Wrap,
|
||||
);
|
||||
|
||||
let cx = global.get_cx();
|
||||
unsafe {
|
||||
let cx = global.get_cx();
|
||||
rooted!(in(cx) let mut jsval = UndefinedValue());
|
||||
views.to_jsval(cx, jsval.handle_mut());
|
||||
rooted!(in(*cx) let mut jsval = UndefinedValue());
|
||||
views.to_jsval(*cx, jsval.handle_mut());
|
||||
pose.views.set(jsval.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue