mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -40,7 +40,6 @@ impl XRView {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn new<V: Copy>(
|
||||
global: &GlobalScope,
|
||||
session: &XRSession,
|
||||
|
@ -65,7 +64,7 @@ impl XRView {
|
|||
|
||||
// row_major since euclid uses row vectors
|
||||
let proj = view.projection.to_row_major_array();
|
||||
let cx = unsafe { JSContext::from_ptr(global.get_cx()) };
|
||||
let cx = global.get_cx();
|
||||
create_typed_array(cx, &proj, &ret.proj);
|
||||
ret
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue