mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Meta: Manually compute the length of the WASM JS REPL source string
The REPL does not have a reliable way to tell us the UTF-8 byte count of the source string, so we must use strlen() ourselves.
This commit is contained in:
parent
fcc3348bc8
commit
d50b9165cd
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/d50b9165cd Pull-request: https://github.com/SerenityOS/serenity/pull/16332
@ -386,7 +386,7 @@ extern "C" int initialize_repl(char const* time_zone)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" bool execute(char const* s, u32 length)
|
||||
extern "C" bool execute(char const* source)
|
||||
{
|
||||
return parse_and_run(*g_interpreter, { s, length }, "REPL"sv);
|
||||
return parse_and_run(*g_interpreter, { source, strlen(source) }, "REPL"sv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user