aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/error.rs')
-rw-r--r--components/script/dom/bindings/error.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index cb39e4f0755..e2e06d8205a 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -97,7 +97,7 @@ static ERROR_FORMAT_STRING: JSErrorFormatString = JSErrorFormatString {
};
/// Callback used to throw `TypeError`s.
-extern fn get_error_message(_user_ref: *mut libc::c_void,
+unsafe extern fn get_error_message(_user_ref: *mut libc::c_void,
_locale: *const libc::c_char,
error_number: libc::c_uint) -> *const JSErrorFormatString
{
@@ -109,6 +109,6 @@ extern fn get_error_message(_user_ref: *mut libc::c_void,
pub fn throw_type_error(cx: *mut JSContext, error: &str) {
let error = error.to_c_str();
unsafe {
- JS_ReportErrorNumber(cx, Some(get_error_message), ptr::mut_null(), 0, error.as_ptr());
+ JS_ReportErrorNumber(cx, Some(get_error_message), ptr::null_mut(), 0, error.as_ptr());
}
}