mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:07:34 +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
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