Don't create an expando holder to delete an expando.

If there is no expando object, there will be no expando to delete.
This commit is contained in:
Ms2ger 2015-01-25 21:19:00 +01:00
parent ff8cbff810
commit 5f5381e4c1

View file

@ -73,9 +73,10 @@ pub unsafe extern fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, i
pub unsafe extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
bp: *mut bool) -> bool {
let expando = EnsureExpandoObject(cx, proxy);
let expando = GetExpandoObject(proxy);
if expando.is_null() {
return false;
*bp = true;
return true;
}
return delete_property_by_id(cx, expando, id, &mut *bp);