Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBorrow failure if a major GC happens while running ScriptThread::handle_fetch_metadata #26857
Comments
|
I think probably the "right" way to fix this is to use servo/components/script/dom/globalscope.rs Line 300 in 872d624 servo/components/script/dom/globalscope.rs Line 1372 in 872d624 (actually, the The "quick" solution would be, I think, to scope the borrow and clone the Also, this would have to be done for each Actually, just cloning is not enough, since you need to carry state across various calls, so probably would need to take it out, drop the borrow, call the method, and then re-borrow and put it back in the vector... Maybe it would be cleaner to do it properly by restructuring the flow to use the |
Do not trace pending parsers <!-- Please describe your changes on the following line: --> FIX #26857 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./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. -->
Do not trace pending parsers <!-- Please describe your changes on the following line: --> FIX #26857 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./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. -->
This happens because of this code which can end up allocating JS objects and triggering a GC. When we trace the script thread thread, we hit a borrow error when trying to trace the
incomplete_parser_contextsfield.