Skip to content

Commit 43bd534

Browse files
committed
LibWeb/HTML: Create a temporary execution context to abort navigation
Stops this WPT test from crashing: navigation-api/ordering-and-transition/transition-to.html ...it now times out instead, so more work is needed before importing.
1 parent d2029b1 commit 43bd534

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Libraries/LibWeb/HTML/Navigable.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <LibWeb/HTML/Parser/HTMLParser.h>
3838
#include <LibWeb/HTML/SandboxingFlagSet.h>
3939
#include <LibWeb/HTML/Scripting/ClassicScript.h>
40+
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
4041
#include <LibWeb/HTML/SessionHistoryEntry.h>
4142
#include <LibWeb/HTML/StructuredSerialize.h>
4243
#include <LibWeb/HTML/TraversableNavigable.h>
@@ -2569,6 +2570,8 @@ void Navigable::inform_the_navigation_api_about_aborting_navigation()
25692570
return;
25702571

25712572
queue_global_task(Task::Source::NavigationAndTraversal, *active_window(), GC::create_function(heap(), [this] {
2573+
HTML::TemporaryExecutionContext execution_context { active_window()->realm() };
2574+
25722575
// 2. Let navigation be navigable's active window's navigation API.
25732576
VERIFY(active_window());
25742577
auto navigation = active_window()->navigation();

0 commit comments

Comments
 (0)