Igor Matuszewski
ca48a4248a
servo: Merge #19644 - Root sequence<any> params using CustomAutoRooter (from Xanewok:root-seq-any); r=jdm
...
<!-- Please describe your changes on the following line: -->
Attempt at https://github.com/servo/servo/issues/16678 . At the moment this pulls an external [remove-handle-conv](https://github.com/Xanewok/rust-mozjs/tree/remove-handle-conv ) branch for rust-mozjs (removing `FromJSValConvertible` implementation for `HandleValue` and adding one for `*mut JSObject`)
In short, this roots the `sequence<any>` and `sequence<object>` function arguments using `CustomAutoRooter` (introduced in https://github.com/servo/rust-mozjs/pull/382 ).
As per https://github.com/servo/servo/issues/16678#issuecomment-302224110 the underlying vector contains raw gc thing pointers instead of handles. To do that, this introduces new possible `isMember = "AutoRoot"` value in CodegenRust.py.
The rooted argument is passed to a function wrapped in a `CustomAutoRooterGuard` [RAII root guard](ed5e37a288/src/rust.rs (L586-L588) ) (e.g. as `CustomAutoRooterGuard<Vec<JSVal>>`)
I felt quite out of my depth when trying to adapt CodegenRust.py code, so I'd appreciate any help with how can be done better/in a more clean manner.
Also the name `CustomAutoRooterGuard` is quite lengthy, so I'm also open to changing it (`AutoRoot`? `AutoRootGuard`?)
---
<!-- 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
- [x] These changes fix #16678 (github issue number if applicable).
<!-- Either: -->
- [X] 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. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 989d2fd53267d063212ef3b7b7f13f2402943c4a
2018-01-05 14:02:53 -06:00
..
2018-01-05 14:02:53 -06:00
2017-12-01 11:41:47 -06:00
2017-10-31 16:14:59 -05:00
2017-10-18 13:56:05 -05:00
2018-01-05 14:02:53 -06:00
2017-08-23 17:18:31 -05:00
2017-10-16 11:21:21 -05:00
2017-10-19 02:36:32 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-12-18 10:19:30 -06:00
2017-11-28 04:08:51 -06:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-06-16 17:37:26 -07:00
2017-11-06 10:46:44 -06:00
2017-10-18 13:56:05 -05:00
2017-10-30 18:25:45 -05:00
2017-10-17 16:04:10 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-30 18:25:45 -05:00
2017-10-18 13:56:05 -05:00
2017-09-26 03:20:05 -05:00
2017-10-18 13:56:05 -05:00
2017-11-21 07:47:52 -06:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-17 16:04:10 -05:00
2017-10-30 18:25:45 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-30 18:25:45 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-12-14 17:02:44 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-11-22 18:30:57 -06:00
2017-10-16 11:21:21 -05:00
2017-12-08 07:49:54 -06:00
2017-11-22 18:30:57 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-12-08 17:37:32 -06:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-11-20 20:48:17 -06:00
2017-12-01 11:41:47 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-11-01 06:37:54 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-11-20 18:22:06 -06:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-27 05:56:12 -05:00
2017-11-06 10:46:44 -06:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-12-06 14:16:04 -06:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-12-06 14:16:04 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-24 17:02:18 -05:00
2017-12-17 03:50:33 -06:00
2017-10-16 11:21:21 -05:00
2017-12-09 13:58:25 -06:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-16 11:21:21 -05:00
2017-11-24 08:47:31 -06:00
2017-11-09 10:00:38 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-30 18:25:45 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-30 18:25:45 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-12-01 11:41:47 -06:00
2017-10-16 11:21:21 -05:00
2017-09-26 03:20:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-12-10 18:37:58 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 17:07:50 -05:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-09-26 03:20:05 -05:00
2017-10-16 11:21:21 -05:00
2017-11-20 19:31:52 -06:00
2017-10-19 02:36:32 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-16 11:21:21 -05:00
2017-08-23 10:59:39 -05:00
2018-01-05 05:11:00 -06:00
2017-10-21 15:13:04 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-12-08 07:49:54 -06:00
2017-10-17 16:04:10 -05:00
2017-12-22 04:50:16 -06:00
2017-12-07 10:31:45 -06:00
2017-10-16 11:21:21 -05:00
2017-09-07 12:45:46 -05:00
2017-09-07 12:45:46 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-12-07 10:31:45 -06:00
2017-12-14 17:02:44 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-09-26 03:20:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-21 11:06:08 -05:00
2017-10-18 13:56:05 -05:00
2017-12-06 14:16:04 -06:00
2017-10-18 13:56:05 -05:00
2017-11-20 18:22:06 -06:00
2017-10-18 13:56:05 -05:00
2017-11-13 17:06:25 -06:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-10-30 18:25:45 -05:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-05-03 13:33:56 -05:00
2017-05-03 13:33:56 -05:00
2017-10-16 11:21:21 -05:00
2017-11-16 11:51:01 -06:00
2018-01-05 14:02:53 -06:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-12-10 18:37:58 -06:00
2017-11-09 10:00:38 -06:00
2017-10-16 17:07:50 -05:00
2017-10-17 16:04:10 -05:00
2017-10-17 16:04:10 -05:00
2017-10-17 16:04:10 -05:00
2017-10-16 11:21:21 -05:00
2017-10-21 15:13:04 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-11-01 06:37:54 -05:00
2017-10-30 18:25:45 -05:00
2017-11-06 10:46:44 -06:00
2017-10-16 11:21:21 -05:00
2017-10-27 05:56:12 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 17:07:50 -05:00
2017-10-16 17:07:50 -05:00
2017-10-18 13:56:05 -05:00
2017-11-02 15:52:42 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-10-18 13:56:05 -05:00
2017-11-13 11:50:44 -06:00
2017-11-13 11:50:44 -06:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-10-16 11:21:21 -05:00
2017-11-09 10:00:38 -06:00
2017-12-01 11:41:47 -06:00
2017-10-16 11:21:21 -05:00
2017-10-18 13:56:05 -05:00
2017-11-01 16:56:06 -05:00
2017-10-16 11:21:21 -05:00
2017-10-16 11:21:21 -05:00
2017-10-30 18:25:45 -05:00
2017-10-18 13:56:05 -05:00
2017-11-22 18:30:57 -06:00
2017-11-23 11:14:11 -06:00
2017-09-01 05:51:00 -05:00
2017-10-16 11:21:21 -05:00