mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
ff8cbff810
commit
5f5381e4c1
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue