mirror of
https://github.com/servo/servo
synced 2026-05-10 17:12:23 +02:00
return Option from GlobalScope::current <!-- Please describe your changes on the following line: --> handles the case where `GlobalScope::current` calls `CurrentGlobalOrNull` and the result is null --- <!-- 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 #17238 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because: no functionality change & ./mach build -d has no errors <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17472) <!-- Reviewable:end -->