mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-09 02:21:53 +00:00
LibJS: Change PropertyKey(ByteString) to PropertyKey(String)
...and deal with the fallout.
This commit is contained in:
parent
3b5032c4b1
commit
d7908dbff5
Notes:
github-actions[bot]
2025-03-24 22:28:48 +00:00
Author: https://github.com/awesomekling
Commit: d7908dbff5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
17 changed files with 78 additions and 78 deletions
|
@ -58,7 +58,7 @@ void Instance::initialize(JS::Realm& realm)
|
|||
m_function_instances.set(address, *object);
|
||||
}
|
||||
|
||||
m_exports->define_direct_property(export_.name(), *object, JS::default_attributes);
|
||||
m_exports->define_direct_property(MUST(String::from_byte_string(export_.name())), *object, JS::default_attributes);
|
||||
},
|
||||
[&](Wasm::GlobalAddress const& address) {
|
||||
Optional<GC::Ptr<Global>> object = cache.get_global_instance(address);
|
||||
|
@ -66,7 +66,7 @@ void Instance::initialize(JS::Realm& realm)
|
|||
object = realm.create<Global>(realm, address);
|
||||
}
|
||||
|
||||
m_exports->define_direct_property(export_.name(), *object, JS::default_attributes);
|
||||
m_exports->define_direct_property(MUST(String::from_byte_string(export_.name())), *object, JS::default_attributes);
|
||||
},
|
||||
[&](Wasm::MemoryAddress const& address) {
|
||||
Optional<GC::Ptr<Memory>> object = m_memory_instances.get(address);
|
||||
|
@ -75,7 +75,7 @@ void Instance::initialize(JS::Realm& realm)
|
|||
m_memory_instances.set(address, *object);
|
||||
}
|
||||
|
||||
m_exports->define_direct_property(export_.name(), *object, JS::default_attributes);
|
||||
m_exports->define_direct_property(MUST(String::from_byte_string(export_.name())), *object, JS::default_attributes);
|
||||
},
|
||||
[&](Wasm::TableAddress const& address) {
|
||||
Optional<GC::Ptr<Table>> object = m_table_instances.get(address);
|
||||
|
@ -84,7 +84,7 @@ void Instance::initialize(JS::Realm& realm)
|
|||
m_table_instances.set(address, *object);
|
||||
}
|
||||
|
||||
m_exports->define_direct_property(export_.name(), *object, JS::default_attributes);
|
||||
m_exports->define_direct_property(MUST(String::from_byte_string(export_.name())), *object, JS::default_attributes);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue