mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
script: fix BorrowError in (new Blob).slice(0,0).text() When getting the text of a sliced Blob, we call GlobalScope.get_blob_url_id, which borrows the blob_state field mutably and calls the get_blob_size method (aka [Blob#size](https://w3c.github.io/FileAPI/#dfn-size)), which tries to borrow the same field immutably, causing a panic. This patch inlines the relevant parts of get_blob_size into get_blob_url_id, so we can reuse the mutable borrow. * /FileAPI/Blob-methods-from-detached-frame.html was 4/4 FAIL, will be 4/4 PASS once #29396 also lands * /fetch/api/basic/scheme-blob.sub.any.html was CRASH, now 10/17 PASS and 7/17 FAIL * /fetch/api/basic/scheme-blob.sub.any.worker.html was CRASH, now 10/17 PASS and 7/17 FAIL --- <!-- 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 #29450 <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ |
||
---|---|---|
.. | ||
dromaeo | ||
html | ||
jquery | ||
power | ||
unit | ||
wpt |