Implement dummy getOwnPropertyNames and enumerate traps.

This commit is contained in:
Ms2ger 2014-12-24 16:55:38 +01:00
parent 57c520d8cf
commit 919f2217f0
12 changed files with 55 additions and 15 deletions

View file

@ -16,6 +16,7 @@ use js::glue::GetProxyExtra;
use js::glue::{GetObjectProto, GetObjectParent, SetProxyExtra, GetProxyHandler};
use js::glue::InvokeGetOwnPropertyDescriptor;
use js::glue::RUST_js_GetErrorMessage;
use js::glue::AutoIdVector;
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY, JSRESOLVE_QUALIFIED};
use libc;
@ -130,3 +131,14 @@ pub fn FillPropertyDescriptor(desc: &mut JSPropertyDescriptor, obj: *mut JSObjec
desc.setter = None;
desc.shortid = 0;
}
pub unsafe extern fn getOwnPropertyNames_(_cx: *mut JSContext,
_obj: *mut JSObject,
_v: *mut AutoIdVector) -> bool {
true
}
pub unsafe extern fn enumerate_(_cx: *mut JSContext, _obj: *mut JSObject,
_v: *mut AutoIdVector) -> bool {
true
}