mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Return false when GetPropertyKeys fails
This commit is contained in:
parent
a84d4ab755
commit
764f1a3724
1 changed files with 6 additions and 4 deletions
|
@ -5269,8 +5269,9 @@ class CGDOMJSProxyHandler_ownPropertyKeys(CGAbstractExternMethod):
|
||||||
"""
|
"""
|
||||||
rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>());
|
rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>());
|
||||||
get_expando_object(proxy, expando.handle_mut());
|
get_expando_object(proxy, expando.handle_mut());
|
||||||
if !expando.is_null() {
|
if !expando.is_null() &&
|
||||||
GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props);
|
!GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -5314,8 +5315,9 @@ class CGDOMJSProxyHandler_getOwnEnumerablePropertyKeys(CGAbstractExternMethod):
|
||||||
"""
|
"""
|
||||||
rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>());
|
rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>());
|
||||||
get_expando_object(proxy, expando.handle_mut());
|
get_expando_object(proxy, expando.handle_mut());
|
||||||
if !expando.is_null() {
|
if !expando.is_null() &&
|
||||||
GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props);
|
!GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue