mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Represent transferred objects as an empty object
This matches the behavior of the three major engines.
This commit is contained in:
parent
cfcec5e18e
commit
6e3b816763
Notes:
sideshowbarker
2024-07-18 04:38:32 +09:00
Author: https://github.com/ADKaster
Commit: 6e3b816763
Pull-request: https://github.com/SerenityOS/serenity/pull/22361
1 changed files with 1 additions and 2 deletions
|
@ -578,9 +578,8 @@ public:
|
||||||
// 2. If memory[serialized] exists, then return memory[serialized].
|
// 2. If memory[serialized] exists, then return memory[serialized].
|
||||||
if (tag == ValueTag::ObjectReference) {
|
if (tag == ValueTag::ObjectReference) {
|
||||||
auto index = m_serialized[m_position++];
|
auto index = m_serialized[m_position++];
|
||||||
// FIXME: For transferred items, find a way to avoid putting placeholders in the serialized data
|
|
||||||
if (index == NumericLimits<u32>::max()) {
|
if (index == NumericLimits<u32>::max()) {
|
||||||
return JS::js_null();
|
return JS::Object::create(*m_vm.current_realm(), nullptr);
|
||||||
}
|
}
|
||||||
return m_memory[index];
|
return m_memory[index];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue