ladybird/Userland/Libraries/LibWeb/Platform/EventLoopPlugin.h
Matthew Olsson ff00d21d58 Everywhere: Mark a bunch of function parameters as NOESCAPE
This fixes the relevant warnings when running LibJSGCVerifier. Note that
the analysis is only performed over LibJS-adjacent code, but could be
performed over the entire codebase. That will have to wait for a future
commit.
2024-04-09 09:10:44 +02:00

28 lines
617 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibJS/SafeFunction.h>
#include <LibWeb/Forward.h>
namespace Web::Platform {
class EventLoopPlugin {
public:
static EventLoopPlugin& the();
static void install(EventLoopPlugin&);
virtual ~EventLoopPlugin();
virtual void spin_until(NOESCAPE JS::SafeFunction<bool()> goal_condition) = 0;
virtual void deferred_invoke(JS::SafeFunction<void()>) = 0;
virtual NonnullRefPtr<Timer> create_timer() = 0;
virtual void quit() = 0;
};
}