mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
LibJS: Remove the VERIFY_NOT_REACHED in link_and_eval_module
Since the spec does not fully define the entry points of modules what this means is kind of unclear. But it does work in most cases and can be useful. We do print out a warning just to clarify why there could be strange things.
This commit is contained in:
parent
d46be7e7f2
commit
14d1601a76
Notes:
sideshowbarker
2024-07-17 19:46:48 +09:00
Author: https://github.com/davidot Commit: https://github.com/SerenityOS/serenity/commit/14d1601a769 Pull-request: https://github.com/SerenityOS/serenity/pull/12288 Reviewed-by: https://github.com/awesomekling
@ -766,10 +766,9 @@ ThrowCompletionOr<void> VM::link_and_eval_module(Module& module)
|
||||
|
||||
if (module_or_end.is_end()) {
|
||||
dbgln_if(JS_MODULE_DEBUG, "[JS MODULE] Warning introducing module via link_and_eval_module {}", module.filename());
|
||||
if (m_loaded_modules.size() > 0) {
|
||||
dbgln("Using link_and_eval module as entry point is not allowed if it is not the first module!");
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
if (m_loaded_modules.size() > 0)
|
||||
dbgln("Warning: Using multiple modules as entry point can lead to unexpected results");
|
||||
|
||||
m_loaded_modules.empend(
|
||||
&module,
|
||||
module.filename(),
|
||||
|
Loading…
Reference in New Issue
Block a user