mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Notes:
github-actions[bot]
2025-01-21 16:49:39 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/85b424464a1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3335
@@ -132,7 +132,7 @@ void execute_script(HTML::BrowsingContext const& browsing_context, ByteString bo
|
||||
return JS::js_undefined();
|
||||
timer->stop();
|
||||
|
||||
auto promise_promise = GC::Ref { verify_cast<JS::Promise>(*promise->promise()) };
|
||||
auto promise_promise = GC::Ref { as<JS::Promise>(*promise->promise()) };
|
||||
on_complete->function()({ promise_promise->state(), promise_promise->result() });
|
||||
|
||||
return JS::js_undefined();
|
||||
@@ -164,7 +164,7 @@ void execute_async_script(HTML::BrowsingContext const& browsing_context, ByteStr
|
||||
|
||||
// 7. Let promise be a new Promise.
|
||||
auto promise_capability = WebIDL::create_promise(realm);
|
||||
GC::Ref promise { verify_cast<JS::Promise>(*promise_capability->promise()) };
|
||||
GC::Ref promise { as<JS::Promise>(*promise_capability->promise()) };
|
||||
|
||||
// 8. Run the following substeps in parallel:
|
||||
Platform::EventLoopPlugin::the().deferred_invoke(GC::create_function(realm.heap(), [&vm, &realm, &browsing_context, timer, promise_capability, promise, body = move(body), arguments = move(arguments)]() mutable {
|
||||
|
||||
Reference in New Issue
Block a user