Replace unsafe_blocks by unsafe_code.

This commit is contained in:
Manish Goregaokar 2015-03-19 07:40:22 +05:30 committed by Ms2ger
parent 4eb26065ac
commit 3479d3fa7f
53 changed files with 151 additions and 57 deletions

View file

@ -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;