LibWeb/HTML: Invalidate frozen ports array on initMessageEvent

In the case that initMessageEvent is called (even with the same
ports), we should return a new array object. This fixes an issue
where the cached m_ports_array was not cleared, causing the
attribute to return the old object identity.
This commit is contained in:
Shannon Booth
2026-01-05 23:11:54 +01:00
committed by Shannon Booth
parent 82ae2a183c
commit 8a8383d59d
Notes: github-actions[bot] 2026-01-06 10:49:57 +00:00
2 changed files with 5 additions and 3 deletions

View File

@@ -2,13 +2,13 @@ Harness status: OK
Found 9 tests
7 Pass
2 Fail
8 Pass
1 Fail
Pass MessageEvent constructor called as normal function
Pass Default event values
Pass MessageEventInit dictionary
Pass Passing null for ports member
Fail ports attribute should be a FrozenArray
Pass ports attribute should be a FrozenArray
Pass initMessageEvent operation
Pass Passing null for ports parameter to initMessageEvent
Pass initMessageEvent operation default parameter values