mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00: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 ___ |
||
---|---|---|
.. | ||
docs | ||
dom | ||
task_source | ||
animation_timeline.rs | ||
animations.rs | ||
body.rs | ||
build.rs | ||
canvas_state.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
devtools.rs | ||
document_loader.rs | ||
euclidext.rs | ||
fetch.rs | ||
image_listener.rs | ||
init.rs | ||
layout_image.rs | ||
lib.rs | ||
mem.rs | ||
microtask.rs | ||
network_listener.rs | ||
realms.rs | ||
script_module.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
serviceworker_manager.rs | ||
stylesheet_loader.rs | ||
stylesheet_set.rs | ||
task.rs | ||
task_manager.rs | ||
task_queue.rs | ||
test.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |