Auto merge of #23183 - krk:fix-23144, r=asajeffrey
Auto merge of #23183 - krk:fix-23144, r=asajeffrey

Replace panic with warn in DocumentLoader.finish_load.

Fix panic on broken script URL with an onerror handler that rewrites the document.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #23144

<!-- 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/23183)
<!-- Reviewable:end -->

saneyuki/servo,DominoTree/servo,paulrouget/servo,DominoTree/servo,notriddle/servo,saneyuki/servo,larsbergstrom/servo,DominoTree/servo,saneyuki/servo,emilio/servo,notriddle/servo,emilio/servo,KiChjang/servo,larsbergstrom/servo,nnethercote/servo,emilio/servo,nnethercote/servo,larsbergstrom/servo,pyfisch/servo,pyfisch/servo,pyfisch/servo,paulrouget/servo,emilio/servo,saneyuki/servo,notriddle/servo,larsbergstrom/servo,paulrouget/servo,paulrouget/servo,emilio/servo,nnethercote/servo,KiChjang/servo,splav/servo,paulrouget/servo,saneyuki/servo,notriddle/servo,splav/servo,splav/servo,emilio/servo,DominoTree/servo,emilio/servo,pyfisch/servo,nnethercote/servo,KiChjang/servo,paulrouget/servo,notriddle/servo,larsbergstrom/servo,KiChjang/servo,pyfisch/servo,KiChjang/servo,pyfisch/servo,notriddle/servo,KiChjang/servo,nnethercote/servo,notriddle/servo,KiChjang/servo,larsbergstrom/servo,saneyuki/servo,splav/servo,DominoTree/servo,splav/servo,splav/servo,pyfisch/servo,splav/servo,larsbergstrom/servo,notriddle/servo,pyfisch/servo,pyfisch/servo,DominoTree/servo,larsbergstrom/servo,larsbergstrom/servo,DominoTree/servo,saneyuki/servo,emilio/servo,nnethercote/servo,emilio/servo,splav/servo,nnethercote/servo,DominoTree/servo,splav/servo,paulrouget/servo,nnethercote/servo,saneyuki/servo,paulrouget/servo,saneyuki/servo,saneyuki/servo,notriddle/servo,paulrouget/servo,KiChjang/servo,larsbergstrom/servo,DominoTree/servo,KiChjang/servo,emilio/servo,pyfisch/servo,splav/servo,KiChjang/servo,nnethercote/servo,paulrouget/servo,DominoTree/servo,nnethercote/servo,notriddle/servo