Couple more fixes to handle 'setter' properties in WebIDL

This commit is contained in:
Bruno de Oliveira Abinader 2014-11-04 10:38:18 -08:00
parent c828e83604
commit b50cfa56a9
2 changed files with 11 additions and 11 deletions

View file

@ -48,7 +48,7 @@ pub unsafe extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObj
JS_GetPropertyDescriptorById(cx, proto, id, JSRESOLVE_QUALIFIED, desc) != 0
}
pub unsafe fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
pub unsafe extern fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
static JSMSG_GETTER_ONLY: libc::c_uint = 160;
@ -72,11 +72,6 @@ pub unsafe fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid
(*desc).setter, (*desc).attrs) != 0;
}
pub unsafe extern fn defineProperty(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
defineProperty_(cx, proxy, id, desc)
}
pub unsafe extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
bp: *mut bool) -> bool {
let expando = EnsureExpandoObject(cx, proxy);