mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
LibJS: Replace PropertyKey(char[]) with PropertyKey(FlyString)
...and deal with the fallout.
This commit is contained in:
parent
d7908dbff5
commit
53da8893ac
Notes:
github-actions[bot]
2025-03-24 22:28:43 +00:00
Author: https://github.com/awesomekling
Commit: 53da8893ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
55 changed files with 254 additions and 251 deletions
|
@ -243,7 +243,7 @@ TESTJS_GLOBAL_FUNCTION(test_simd_vector, testSIMDVector)
|
|||
if (!is<JS::TypedArrayBase>(*got))
|
||||
return vm.throw_completion<JS::TypeError>("Expected a TypedArray"sv);
|
||||
auto& got_array = static_cast<JS::TypedArrayBase&>(*got);
|
||||
auto element_size = 128 / TRY(TRY(expected_array.get("length")).to_u32(vm));
|
||||
auto element_size = 128 / TRY(TRY(expected_array.get("length"_fly_string)).to_u32(vm));
|
||||
size_t i = 0;
|
||||
for (auto it = expected_array.indexed_properties().begin(false); it != expected_array.indexed_properties().end(); ++it) {
|
||||
auto got_value = TRY(got_array.get(i++));
|
||||
|
@ -277,8 +277,8 @@ TESTJS_GLOBAL_FUNCTION(test_simd_vector, testSIMDVector)
|
|||
void WebAssemblyModule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
define_native_function(realm, "getExport", get_export, 1, JS::default_attributes);
|
||||
define_native_function(realm, "invoke", wasm_invoke, 1, JS::default_attributes);
|
||||
define_native_function(realm, "getExport"_fly_string, get_export, 1, JS::default_attributes);
|
||||
define_native_function(realm, "invoke"_fly_string, wasm_invoke, 1, JS::default_attributes);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::get_export)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue