Truly independent web browser
LibWeb: Root the seen list when converting a value to an IndexedDB key
Shannon Booth3ea942c2ad62
diff --git a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cppindex a91e5b41410..89e470b7e28 100644--- a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp+++ b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp@@ -279,7 +279,7 @@ bool fire_a_version_change_event(JS::Realm& realm, Utf16FlyString const& event_n}// https://w3c.github.io/IndexedDB/#convert-value-to-key-WebIDL::ExceptionOr<GC::Ref<Key>> convert_a_value_to_a_key(JS::Realm& realm, JS::Value input, Vector<JS::Value> seen)+WebIDL::ExceptionOr<GC::Ref<Key>> convert_a_value_to_a_key(JS::Realm& realm, JS::Value input, GC::RootVector<JS::Value> seen){// 1. If seen was not given, then let seen be a new empty set.// NOTE: This is handled by the caller.diff --git a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.h b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.hindex c61fc0aac04..2b5c38cb76f 100644--- a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.h+++ b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.h@@ -8,6 +8,7 @@#include <AK/StringView.h>#include <AK/Variant.h>+#include <LibGC/RootVector.h>#include <LibJS/Runtime/Realm.h>#include <LibJS/Runtime/Value.h>#include <LibWeb/Bindings/IDBCursor.h>@@ -36,7 +37,7 @@ using RetrieveMultipleItemsOptions = Bindings::IDBGetAllOptions;void open_a_database_connection(JS::Realm&, StorageAPI::StorageKey, Utf16String, Optional<u64>, GC::Ref<IDBRequest>, GC::Ref<GC::Function<void(WebIDL::ExceptionOr<GC::Ref<IDBDatabase>>)>>);bool fire_a_version_change_event(JS::Realm&, Utf16FlyString const&, GC::Ref<DOM::EventTarget>, u64, Optional<u64>);-WebIDL::ExceptionOr<GC::Ref<Key>> convert_a_value_to_a_key(JS::Realm&, JS::Value, Vector<JS::Value> = {});+WebIDL::ExceptionOr<GC::Ref<Key>> convert_a_value_to_a_key(JS::Realm&, JS::Value, GC::RootVector<JS::Value> = {});void close_a_database_connection(GC::Ref<IDBDatabase>, GC::Ptr<GC::Function<void()>> on_complete = nullptr, bool forced = false);void upgrade_a_database(JS::Realm&, GC::Ref<IDBDatabase>, u64, GC::Ref<IDBRequest>, GC::Ref<GC::Function<void()>>);void delete_a_database(JS::Realm&, StorageAPI::StorageKey, Utf16String, GC::Ref<IDBRequest>, GC::Ref<GC::Function<void(WebIDL::ExceptionOr<u64>)>>);