diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-10-15 11:59:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 11:59:09 -0400 |
commit | aa916ad20eb4ed0676cff44629a5d89343affed7 (patch) | |
tree | 6887f50d93758b5b6d4161936825ab71c44c6375 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | c5d6bb604d8d03d775cfc59e8bf2afdda2301e7d (diff) | |
parent | 764f1a3724aa73755e6021aeddbba8a465b32423 (diff) | |
download | servo-aa916ad20eb4ed0676cff44629a5d89343affed7.tar.gz servo-aa916ad20eb4ed0676cff44629a5d89343affed7.zip |
Auto merge of #24429 - saschanaz:getpropertykeys, r=jdm
Return false when GetPropertyKeys fails
<!-- Please describe your changes on the following line: -->
As stated in https://github.com/servo/servo/pull/24377#discussion_r333844560.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 01b7fc698ba..c80e8a0697b 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -5292,8 +5292,9 @@ class CGDOMJSProxyHandler_ownPropertyKeys(CGAbstractExternMethod): """ rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>()); get_expando_object(proxy, expando.handle_mut()); - if !expando.is_null() { - GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props); + if !expando.is_null() && + !GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props) { + return false; } return true; @@ -5337,8 +5338,9 @@ class CGDOMJSProxyHandler_getOwnEnumerablePropertyKeys(CGAbstractExternMethod): """ rooted!(in(*cx) let mut expando = ptr::null_mut::<JSObject>()); get_expando_object(proxy, expando.handle_mut()); - if !expando.is_null() { - GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props); + if !expando.is_null() && + !GetPropertyKeys(*cx, expando.handle(), JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props) { + return false; } return true; |