mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
f7beea1397
I saw that this not being implemented was causing a javascript exception to be thrown when loading https://profiler.firefox.com/. I was hoping that like the last time that partially implementing this interface would allow the page to load further, but it seems that this is unfortunately not the case this time! However, this may help other pages load slightly further, and puts some of the scaffolding in place for a proper implementation :^)
38 lines
917 B
C++
38 lines
917 B
C++
/*
|
|
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Bindings/IDBFactoryPrototype.h>
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
|
#include <LibWeb/IndexedDB/IDBFactory.h>
|
|
#include <LibWeb/IndexedDB/IDBOpenDBRequest.h>
|
|
|
|
namespace Web::IndexedDB {
|
|
|
|
JS_DEFINE_ALLOCATOR(IDBFactory);
|
|
|
|
IDBFactory::IDBFactory(JS::Realm& realm)
|
|
: Bindings::PlatformObject(realm)
|
|
{
|
|
}
|
|
|
|
IDBFactory::~IDBFactory() = default;
|
|
|
|
void IDBFactory::initialize(JS::Realm& realm)
|
|
{
|
|
Base::initialize(realm);
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBFactory);
|
|
}
|
|
|
|
// https://w3c.github.io/IndexedDB/#dom-idbfactory-open
|
|
JS::NonnullGCPtr<IDBOpenDBRequest> IDBFactory::open(String const&, Optional<WebIDL::UnsignedLongLong>)
|
|
{
|
|
dbgln("FIXME: Implement IDBFactory::open");
|
|
auto& realm = this->realm();
|
|
return vm().heap().allocate<IDBOpenDBRequest>(realm, realm);
|
|
}
|
|
|
|
}
|