mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -131,7 +131,7 @@ impl DocumentOrShadowRoot {
|
|||
.first()
|
||||
{
|
||||
Some(address) => {
|
||||
let js_runtime = unsafe { JS_GetRuntime(self.window.get_cx()) };
|
||||
let js_runtime = unsafe { JS_GetRuntime(*self.window.get_cx()) };
|
||||
let node = unsafe { node::from_untrusted_node_address(js_runtime, *address) };
|
||||
let parent_node = node.GetParentNode().unwrap();
|
||||
let element_ref = node
|
||||
|
@ -167,7 +167,7 @@ impl DocumentOrShadowRoot {
|
|||
return vec![];
|
||||
}
|
||||
|
||||
let js_runtime = unsafe { JS_GetRuntime(self.window.get_cx()) };
|
||||
let js_runtime = unsafe { JS_GetRuntime(*self.window.get_cx()) };
|
||||
|
||||
// Step 1 and Step 3
|
||||
let nodes = self.nodes_from_point(point, NodesFromPointQueryType::All);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue