mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Replace unsafe_blocks by unsafe_code.
This commit is contained in:
parent
4eb26065ac
commit
3479d3fa7f
53 changed files with 151 additions and 57 deletions
|
@ -403,7 +403,7 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
|||
debug!("{}", message);
|
||||
}
|
||||
|
||||
#[allow(unsafe_blocks)]
|
||||
#[allow(unsafe_code)]
|
||||
fn Gc(self) {
|
||||
unsafe {
|
||||
JS_GC(JS_GetRuntime(self.get_cx()));
|
||||
|
@ -463,7 +463,7 @@ impl<'a, T: Reflectable> ScriptHelpers for JSRef<'a, T> {
|
|||
self.evaluate_script_on_global_with_result(code, "")
|
||||
}
|
||||
|
||||
#[allow(unsafe_blocks)]
|
||||
#[allow(unsafe_code)]
|
||||
fn evaluate_script_on_global_with_result(self, code: &str, filename: &str) -> JSVal {
|
||||
let this = self.reflector().get_jsobject();
|
||||
let cx = global_object_for_js_object(this).root().r().get_cx();
|
||||
|
@ -495,7 +495,7 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
|
|||
*self.browser_context.borrow_mut() = None;
|
||||
}
|
||||
|
||||
#[allow(unsafe_blocks)]
|
||||
#[allow(unsafe_code)]
|
||||
fn clear_js_context_for_script_deallocation(self) {
|
||||
unsafe {
|
||||
*self.js_context.borrow_for_script_deallocation() = None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue