mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
LibWeb: Update workarounds for the empty execution context stack
Use the new helper class to perform this workaround.
This commit is contained in:
parent
8ec7b4401a
commit
f57310999d
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/trflynn89
Commit: f57310999d
Pull-request: https://github.com/SerenityOS/serenity/pull/19840
Reviewed-by: https://github.com/linusg ✅
7 changed files with 30 additions and 88 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Scripting/Fetching.h>
|
||||
#include <LibWeb/HTML/Scripting/ModuleScript.h>
|
||||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/Loader/LoadRequest.h>
|
||||
|
@ -568,9 +569,7 @@ void fetch_descendants_of_and_link_a_module_script(JavaScriptModuleScript& modul
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: This is an ad-hoc hack to make sure that there's an execution context on the VM stack in case linking throws an exception.
|
||||
auto& vm = fetch_client_settings_object.vm();
|
||||
vm.push_execution_context(fetch_client_settings_object.realm_execution_context());
|
||||
TemporaryExecutionContext execution_context { fetch_client_settings_object };
|
||||
|
||||
// FIXME: 2. Let parse error be the result of finding the first parse error given result.
|
||||
|
||||
|
@ -591,9 +590,6 @@ void fetch_descendants_of_and_link_a_module_script(JavaScriptModuleScript& modul
|
|||
TODO();
|
||||
}
|
||||
|
||||
// FIXME: This undoes the ad-hoc hack above.
|
||||
vm.pop_execution_context();
|
||||
|
||||
// 5. Run onComplete given result.
|
||||
on_complete(result);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue