mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update Rust
This commit is contained in:
parent
79956abb38
commit
1026556477
43 changed files with 252 additions and 150 deletions
|
@ -47,7 +47,7 @@ pub extern fn getPropertyDescriptor(cx: *JSContext, proxy: *JSObject, id: jsid,
|
|||
pub extern fn defineProperty(cx: *JSContext, proxy: *JSObject, id: jsid,
|
||||
desc: *JSPropertyDescriptor) -> JSBool {
|
||||
unsafe {
|
||||
if ((*desc).attrs & JSPROP_GETTER) != 0 && (*desc).setter == JS_StrictPropertyStub {
|
||||
if ((*desc).attrs & JSPROP_GETTER) != 0 && (*desc).setter == Some(JS_StrictPropertyStub) {
|
||||
/*return JS_ReportErrorFlagsAndNumber(cx,
|
||||
JSREPORT_WARNING | JSREPORT_STRICT |
|
||||
JSREPORT_STRICT_MODE_ERROR,
|
||||
|
@ -66,6 +66,7 @@ pub extern fn defineProperty(cx: *JSContext, proxy: *JSObject, id: jsid,
|
|||
}
|
||||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub fn _obj_toString(cx: *JSContext, className: *libc::c_char) -> *JSString {
|
||||
unsafe {
|
||||
let name = str::raw::from_c_str(className);
|
||||
|
@ -88,6 +89,7 @@ pub fn _obj_toString(cx: *JSContext, className: *libc::c_char) -> *JSString {
|
|||
}
|
||||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub fn GetExpandoObject(obj: *JSObject) -> *JSObject {
|
||||
unsafe {
|
||||
assert!(is_dom_proxy(obj));
|
||||
|
@ -100,6 +102,7 @@ pub fn GetExpandoObject(obj: *JSObject) -> *JSObject {
|
|||
}
|
||||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub fn EnsureExpandoObject(cx: *JSContext, obj: *JSObject) -> *JSObject {
|
||||
unsafe {
|
||||
assert!(is_dom_proxy(obj));
|
||||
|
@ -120,7 +123,7 @@ pub fn EnsureExpandoObject(cx: *JSContext, obj: *JSObject) -> *JSObject {
|
|||
pub fn FillPropertyDescriptor(desc: &mut JSPropertyDescriptor, obj: *JSObject, readonly: bool) {
|
||||
desc.obj = obj;
|
||||
desc.attrs = if readonly { JSPROP_READONLY } else { 0 } | JSPROP_ENUMERATE;
|
||||
desc.getter = ptr::null();
|
||||
desc.setter = ptr::null();
|
||||
desc.getter = None;
|
||||
desc.setter = None;
|
||||
desc.shortid = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue