LibWeb: Prevent crash when encoding into detached buffer

This handles the case where data is encoded into a detached buffer.
This commit is contained in:
Glenn Skrzypczak
2025-04-18 18:35:44 +02:00
committed by Tim Flynn
parent 8ec420bc28
commit d37d0e4b59
Notes: github-actions[bot] 2025-04-19 11:09:12 +00:00
4 changed files with 301 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../common/sab.js"></script>
<div id=log></div>
<script src="../encoding/encodeInto.any.js"></script>