mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03: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: https://github.com/SerenityOS/serenity/commit/6e3b816763 Pull-request: https://github.com/SerenityOS/serenity/pull/22361
@ -578,9 +578,8 @@ public:
|
||||
// 2. If memory[serialized] exists, then return memory[serialized].
|
||||
if (tag == ValueTag::ObjectReference) {
|
||||
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()) {
|
||||
return JS::js_null();
|
||||
return JS::Object::create(*m_vm.current_realm(), nullptr);
|
||||
}
|
||||
return m_memory[index];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user