mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix crash due to address significance for JSAPI things.
This commit is contained in:
parent
95fc29fa0d
commit
7fec73a432
2 changed files with 3 additions and 3 deletions
|
@ -102,7 +102,7 @@ pub fn throw_not_in_union(cx: *mut JSContext, names: &'static str) -> JSBool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Format string used to throw `TypeError`s.
|
/// Format string used to throw `TypeError`s.
|
||||||
const ERROR_FORMAT_STRING_STRING: [libc::c_char; 4] = [
|
static ERROR_FORMAT_STRING_STRING: [libc::c_char; 4] = [
|
||||||
'{' as libc::c_char,
|
'{' as libc::c_char,
|
||||||
'0' as libc::c_char,
|
'0' as libc::c_char,
|
||||||
'}' as libc::c_char,
|
'}' as libc::c_char,
|
||||||
|
@ -110,7 +110,7 @@ const ERROR_FORMAT_STRING_STRING: [libc::c_char; 4] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Format string struct used to throw `TypeError`s.
|
/// Format string struct used to throw `TypeError`s.
|
||||||
const ERROR_FORMAT_STRING: JSErrorFormatString = JSErrorFormatString {
|
static mut ERROR_FORMAT_STRING: JSErrorFormatString = JSErrorFormatString {
|
||||||
format: &ERROR_FORMAT_STRING_STRING as *const libc::c_char,
|
format: &ERROR_FORMAT_STRING_STRING as *const libc::c_char,
|
||||||
argCount: 1,
|
argCount: 1,
|
||||||
exnType: JSEXN_TYPEERR as i16,
|
exnType: JSEXN_TYPEERR as i16,
|
||||||
|
|
|
@ -205,7 +205,7 @@ impl<'a> EventTargetHelpers for JSRef<'a, EventTarget> {
|
||||||
let nargs = 1; //XXXjdm not true for onerror
|
let nargs = 1; //XXXjdm not true for onerror
|
||||||
const ARG_NAME: [c_char; 6] =
|
const ARG_NAME: [c_char; 6] =
|
||||||
['e' as c_char, 'v' as c_char, 'e' as c_char, 'n' as c_char, 't' as c_char, 0];
|
['e' as c_char, 'v' as c_char, 'e' as c_char, 'n' as c_char, 't' as c_char, 0];
|
||||||
const ARG_NAMES: [*const c_char; 1] = [&ARG_NAME as *const c_char];
|
static mut ARG_NAMES: [*const c_char; 1] = [&ARG_NAME as *const c_char];
|
||||||
|
|
||||||
let source: Vec<u16> = source.as_slice().utf16_units().collect();
|
let source: Vec<u16> = source.as_slice().utf16_units().collect();
|
||||||
let handler = unsafe {
|
let handler = unsafe {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue