mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-16 08:50:26 +03:00
Everywhere: Write dtors for types with incomplete members out-of-line
These are rejected by Clang (19) trunk as a result of https://github.com/llvm/llvm-project/pull/77753.
This commit is contained in:
parent
397774d422
commit
bf1f631f25
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/LadybirdBrowser/ladybird/commit/bf1f631f25 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/44 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/trflynn89
@ -16,6 +16,8 @@ NetworkJob::NetworkJob(Stream& output_stream)
|
||||
{
|
||||
}
|
||||
|
||||
NetworkJob::~NetworkJob() = default;
|
||||
|
||||
void NetworkJob::did_finish(NonnullRefPtr<NetworkResponse>&& response)
|
||||
{
|
||||
if (is_cancelled())
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
ProtocolFailed,
|
||||
Cancelled,
|
||||
};
|
||||
virtual ~NetworkJob() override = default;
|
||||
virtual ~NetworkJob() override;
|
||||
|
||||
// Could fire twice, after Headers and after Trailers!
|
||||
Function<void(HTTP::HeaderMap const& response_headers, Optional<u32> response_code)> on_headers_received;
|
||||
|
@ -2627,6 +2627,8 @@ JBIG2ImageDecoderPlugin::JBIG2ImageDecoderPlugin()
|
||||
m_context = make<JBIG2LoadingContext>();
|
||||
}
|
||||
|
||||
JBIG2ImageDecoderPlugin::~JBIG2ImageDecoderPlugin() = default;
|
||||
|
||||
IntSize JBIG2ImageDecoderPlugin::size()
|
||||
{
|
||||
return m_context->page.size;
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
static bool sniff(ReadonlyBytes);
|
||||
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
|
||||
|
||||
virtual ~JBIG2ImageDecoderPlugin() override = default;
|
||||
virtual ~JBIG2ImageDecoderPlugin() override;
|
||||
|
||||
virtual IntSize size() override;
|
||||
|
||||
|
@ -988,6 +988,8 @@ JPEG2000ImageDecoderPlugin::JPEG2000ImageDecoderPlugin()
|
||||
m_context = make<JPEG2000LoadingContext>();
|
||||
}
|
||||
|
||||
JPEG2000ImageDecoderPlugin::~JPEG2000ImageDecoderPlugin() = default;
|
||||
|
||||
IntSize JPEG2000ImageDecoderPlugin::size()
|
||||
{
|
||||
return m_context->size;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
static bool sniff(ReadonlyBytes);
|
||||
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
|
||||
|
||||
virtual ~JPEG2000ImageDecoderPlugin() override = default;
|
||||
virtual ~JPEG2000ImageDecoderPlugin() override;
|
||||
|
||||
virtual IntSize size() override;
|
||||
|
||||
|
@ -748,6 +748,8 @@ TIFFImageDecoderPlugin::TIFFImageDecoderPlugin(NonnullOwnPtr<FixedMemoryStream>
|
||||
m_context = make<TIFF::TIFFLoadingContext>(move(stream));
|
||||
}
|
||||
|
||||
TIFFImageDecoderPlugin::~TIFFImageDecoderPlugin() = default;
|
||||
|
||||
bool TIFFImageDecoderPlugin::sniff(ReadonlyBytes bytes)
|
||||
{
|
||||
if (bytes.size() < 4)
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
|
||||
static ErrorOr<NonnullOwnPtr<ExifMetadata>> read_exif_metadata(ReadonlyBytes);
|
||||
|
||||
virtual ~TIFFImageDecoderPlugin() override = default;
|
||||
virtual ~TIFFImageDecoderPlugin() override;
|
||||
|
||||
virtual IntSize size() override;
|
||||
|
||||
|
@ -550,6 +550,8 @@ TinyVGImageDecoderPlugin::TinyVGImageDecoderPlugin(ReadonlyBytes bytes)
|
||||
{
|
||||
}
|
||||
|
||||
TinyVGImageDecoderPlugin::~TinyVGImageDecoderPlugin() = default;
|
||||
|
||||
ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> TinyVGImageDecoderPlugin::create(ReadonlyBytes bytes)
|
||||
{
|
||||
auto plugin = TRY(adopt_nonnull_own_or_enomem(new (nothrow) TinyVGImageDecoderPlugin(bytes)));
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
virtual NaturalFrameFormat natural_frame_format() const override { return NaturalFrameFormat::Vector; }
|
||||
virtual ErrorOr<VectorImageFrameDescriptor> vector_frame(size_t index) override;
|
||||
|
||||
virtual ~TinyVGImageDecoderPlugin() override = default;
|
||||
virtual ~TinyVGImageDecoderPlugin() override;
|
||||
|
||||
private:
|
||||
TinyVGImageDecoderPlugin(ReadonlyBytes);
|
||||
|
@ -24,6 +24,8 @@ CyclicModule::CyclicModule(Realm& realm, StringView filename, bool has_top_level
|
||||
{
|
||||
}
|
||||
|
||||
CyclicModule::~CyclicModule() = default;
|
||||
|
||||
void CyclicModule::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
@ -28,6 +28,8 @@ class CyclicModule : public Module {
|
||||
JS_DECLARE_ALLOCATOR(CyclicModule);
|
||||
|
||||
public:
|
||||
virtual ~CyclicModule() override;
|
||||
|
||||
// Note: Do not call these methods directly unless you are HostResolveImportedModule.
|
||||
// Badges cannot be used because other hosts must be able to call this (and it is called recursively)
|
||||
virtual ThrowCompletionOr<void> link(VM& vm) override final;
|
||||
|
@ -34,6 +34,8 @@ AsyncGenerator::AsyncGenerator(Realm&, Object& prototype, NonnullOwnPtr<Executio
|
||||
{
|
||||
}
|
||||
|
||||
AsyncGenerator::~AsyncGenerator() = default;
|
||||
|
||||
void AsyncGenerator::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
|
||||
static ThrowCompletionOr<NonnullGCPtr<AsyncGenerator>> create(Realm&, Value, ECMAScriptFunctionObject*, NonnullOwnPtr<ExecutionContext>);
|
||||
|
||||
virtual ~AsyncGenerator() override = default;
|
||||
virtual ~AsyncGenerator() override;
|
||||
|
||||
void async_generator_enqueue(Completion, NonnullGCPtr<PromiseCapability>);
|
||||
ThrowCompletionOr<void> resume(VM&, Completion completion);
|
||||
|
@ -116,6 +116,8 @@ SourceTextModule::SourceTextModule(Realm& realm, StringView filename, Script::Ho
|
||||
{
|
||||
}
|
||||
|
||||
SourceTextModule::~SourceTextModule() = default;
|
||||
|
||||
void SourceTextModule::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
@ -19,6 +19,8 @@ class SourceTextModule final : public CyclicModule {
|
||||
JS_DECLARE_ALLOCATOR(SourceTextModule);
|
||||
|
||||
public:
|
||||
virtual ~SourceTextModule() override;
|
||||
|
||||
static Result<NonnullGCPtr<SourceTextModule>, Vector<ParserError>> parse(StringView source_text, Realm&, StringView filename = {}, Script::HostDefined* host_defined = nullptr);
|
||||
|
||||
Program const& parse_node() const { return *m_ecmascript_code; }
|
||||
|
@ -14,6 +14,8 @@ RequestClient::RequestClient(NonnullOwnPtr<Core::LocalSocket> socket)
|
||||
{
|
||||
}
|
||||
|
||||
RequestClient::~RequestClient() = default;
|
||||
|
||||
void RequestClient::die()
|
||||
{
|
||||
// FIXME: Gracefully handle this, or relaunch and reconnect to RequestServer.
|
||||
|
@ -25,6 +25,7 @@ class RequestClient final
|
||||
|
||||
public:
|
||||
explicit RequestClient(NonnullOwnPtr<Core::LocalSocket>);
|
||||
virtual ~RequestClient() override;
|
||||
|
||||
RefPtr<Request> start_request(ByteString const& method, URL::URL const&, HTTP::HeaderMap const& request_headers = {}, ReadonlyBytes request_body = {}, Core::ProxyData const& = {});
|
||||
|
||||
|
@ -198,6 +198,8 @@ FontFace::FontFace(JS::Realm& realm, JS::NonnullGCPtr<WebIDL::Promise> font_stat
|
||||
m_status = Bindings::FontFaceLoadStatus::Error;
|
||||
}
|
||||
|
||||
FontFace::~FontFace() = default;
|
||||
|
||||
void FontFace::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
using FontFaceSource = Variant<String, JS::Handle<WebIDL::BufferSource>>;
|
||||
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FontFace> construct_impl(JS::Realm&, String family, FontFaceSource source, FontFaceDescriptors const& descriptors);
|
||||
virtual ~FontFace() override = default;
|
||||
virtual ~FontFace() override;
|
||||
|
||||
String family() const { return m_family; }
|
||||
WebIDL::ExceptionOr<void> set_family(String const&);
|
||||
|
@ -26,6 +26,8 @@ ImageStyleValue::ImageStyleValue(URL::URL const& url)
|
||||
{
|
||||
}
|
||||
|
||||
ImageStyleValue::~ImageStyleValue() = default;
|
||||
|
||||
void ImageStyleValue::load_any_resources(DOM::Document& document)
|
||||
{
|
||||
if (m_image_request)
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
{
|
||||
return adopt_ref(*new (nothrow) ImageStyleValue(url));
|
||||
}
|
||||
virtual ~ImageStyleValue() override = default;
|
||||
virtual ~ImageStyleValue() override;
|
||||
|
||||
void visit_edges(JS::Cell::Visitor& visitor) const
|
||||
{
|
||||
|
@ -58,6 +58,8 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket> sock
|
||||
async_notify_process_information({ ::getpid() });
|
||||
}
|
||||
|
||||
ConnectionFromClient::~ConnectionFromClient() = default;
|
||||
|
||||
void ConnectionFromClient::die()
|
||||
{
|
||||
Web::Platform::EventLoopPlugin::the().quit();
|
||||
|
@ -33,7 +33,7 @@ class ConnectionFromClient final
|
||||
C_OBJECT(ConnectionFromClient);
|
||||
|
||||
public:
|
||||
~ConnectionFromClient() override = default;
|
||||
~ConnectionFromClient() override;
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
|
@ -70,6 +70,8 @@ PageClient::PageClient(PageHost& owner, u64 id)
|
||||
#endif
|
||||
}
|
||||
|
||||
PageClient::~PageClient() = default;
|
||||
|
||||
void PageClient::schedule_repaint()
|
||||
{
|
||||
if (m_paint_state != PaintState::Ready) {
|
||||
|
@ -29,6 +29,8 @@ class PageClient final : public Web::PageClient {
|
||||
public:
|
||||
static JS::NonnullGCPtr<PageClient> create(JS::VM& vm, PageHost& page_host, u64 id);
|
||||
|
||||
virtual ~PageClient() override;
|
||||
|
||||
static void set_use_gpu_painter();
|
||||
static void set_use_experimental_cpu_transform_support();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user