mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/IndexedDB: Remove spin_until from request processing
This commit is contained in:
parent
6d43e3cc93
commit
5c69784ef9
Notes:
github-actions[bot]
2025-10-08 15:26:51 +00:00
Author: https://github.com/Lubrsi
Commit: 5c69784ef9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6182
16 changed files with 559 additions and 341 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <LibWeb/Bindings/IDBObjectStorePrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||
#include <LibWeb/IndexedDB/IDBCursor.h>
|
||||
#include <LibWeb/IndexedDB/IDBCursorWithValue.h>
|
||||
#include <LibWeb/IndexedDB/IDBIndex.h>
|
||||
|
|
@ -331,6 +332,7 @@ WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::add_or_put(GC::Ref<IDBO
|
|||
|
||||
// 12. Let operation be an algorithm to run store a record into an object store with store, clone, key, and no-overwrite flag.
|
||||
auto operation = GC::Function<WebIDL::ExceptionOr<JS::Value>()>::create(realm.heap(), [&realm, &store, clone, key_value, no_overwrite] -> WebIDL::ExceptionOr<JS::Value> {
|
||||
HTML::TemporaryExecutionContext context { realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
auto optional_key = TRY(store_a_record_into_an_object_store(realm, store, clone, key_value, no_overwrite));
|
||||
|
||||
if (!optional_key || optional_key->is_invalid())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue