diff --git a/Userland/DevTools/HackStudio/Project.h b/Userland/DevTools/HackStudio/Project.h index f0698b9114..c140ea35a5 100644 --- a/Userland/DevTools/HackStudio/Project.h +++ b/Userland/DevTools/HackStudio/Project.h @@ -29,7 +29,7 @@ public: NonnullRefPtr create_file(ByteString const& path) const; - void for_each_text_file(Function) const; + void for_each_text_file(NOESCAPE Function) const; ByteString to_absolute_path(ByteString const&) const; bool project_is_serenity() const; diff --git a/Userland/DevTools/HackStudio/ProjectBuilder.h b/Userland/DevTools/HackStudio/ProjectBuilder.h index 194f38d5d7..7d9cd11123 100644 --- a/Userland/DevTools/HackStudio/ProjectBuilder.h +++ b/Userland/DevTools/HackStudio/ProjectBuilder.h @@ -42,8 +42,8 @@ private: Vector dependencies {}; }; static HashMap> get_defined_libraries(); - static void for_each_library_definition(Function); - static void for_each_library_dependencies(Function)>); + static void for_each_library_definition(NOESCAPE Function); + static void for_each_library_dependencies(NOESCAPE Function)>); static ErrorOr component_name(StringView cmake_file_path); static ErrorOr verify_cmake_is_installed(); static ErrorOr verify_make_is_installed(); diff --git a/Userland/DevTools/HackStudio/ProjectDeclarations.cpp b/Userland/DevTools/HackStudio/ProjectDeclarations.cpp index 701c46e85d..e9e7e13323 100644 --- a/Userland/DevTools/HackStudio/ProjectDeclarations.cpp +++ b/Userland/DevTools/HackStudio/ProjectDeclarations.cpp @@ -20,6 +20,7 @@ ProjectDeclarations& ProjectDeclarations::the() static ProjectDeclarations s_instance; return s_instance; } + void ProjectDeclarations::set_declared_symbols(ByteString const& filename, Vector const& declarations) { m_document_to_declarations.set(filename, declarations); diff --git a/Userland/Libraries/LibGUI/Model.h b/Userland/Libraries/LibGUI/Model.h index f9477a3a43..10d57cf875 100644 --- a/Userland/Libraries/LibGUI/Model.h +++ b/Userland/Libraries/LibGUI/Model.h @@ -114,8 +114,8 @@ public: protected: Model(); - void for_each_view(Function); - void for_each_client(Function); + void for_each_view(NOESCAPE Function); + void for_each_client(NOESCAPE Function); void did_update(unsigned flags = UpdateFlag::InvalidateAllIndices); static bool string_matches(StringView str, StringView needle, unsigned flags) diff --git a/Userland/Libraries/LibGfx/Font/FontDatabase.h b/Userland/Libraries/LibGfx/Font/FontDatabase.h index 4c4fc8f2b1..abd9921ed3 100644 --- a/Userland/Libraries/LibGfx/Font/FontDatabase.h +++ b/Userland/Libraries/LibGfx/Font/FontDatabase.h @@ -37,11 +37,11 @@ public: RefPtr get(FlyString const& family, float point_size, unsigned weight, unsigned width, unsigned slope, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); RefPtr get(FlyString const& family, FlyString const& variant, float point_size, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); RefPtr get_by_name(StringView); - void for_each_font(Function); - void for_each_fixed_width_font(Function); + void for_each_font(NOESCAPE Function); + void for_each_fixed_width_font(NOESCAPE Function); - void for_each_typeface(Function); - void for_each_typeface_with_family_name(FlyString const& family_name, Function); + void for_each_typeface(NOESCAPE Function); + void for_each_typeface_with_family_name(FlyString const& family_name, NOESCAPE Function); void load_all_fonts_from_uri(StringView); diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h index f4bc039fab..959201e687 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h @@ -32,7 +32,7 @@ ThrowCompletionOr call_impl(VM&, Value function, Value this_value, Readon ThrowCompletionOr call_impl(VM&, FunctionObject& function, Value this_value, ReadonlySpan arguments = {}); ThrowCompletionOr> construct_impl(VM&, FunctionObject&, ReadonlySpan arguments = {}, FunctionObject* new_target = nullptr); ThrowCompletionOr length_of_array_like(VM&, Object const&); -ThrowCompletionOr> create_list_from_array_like(VM&, Value, Function(Value)> = {}); +ThrowCompletionOr> create_list_from_array_like(VM&, Value, NOESCAPE Function(Value)> = {}); ThrowCompletionOr species_constructor(VM&, Object const&, FunctionObject& default_constructor); ThrowCompletionOr get_function_realm(VM&, FunctionObject const&); ThrowCompletionOr initialize_bound_name(VM&, DeprecatedFlyString const&, Value, Environment*); diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h index 193200541d..d6e4a04892 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.h +++ b/Userland/Libraries/LibJS/Runtime/Object.h @@ -161,7 +161,7 @@ public: // 14.7.5 The for-in, for-of, and for-await-of Statements - Optional enumerate_object_properties(Function(Value)>) const; + Optional enumerate_object_properties(NOESCAPE Function(Value)>) const; // Implementation-specific storage abstractions diff --git a/Userland/Libraries/LibJS/Runtime/Realm.h b/Userland/Libraries/LibJS/Runtime/Realm.h index 9252e50184..5f0f54ca50 100644 --- a/Userland/Libraries/LibJS/Runtime/Realm.h +++ b/Userland/Libraries/LibJS/Runtime/Realm.h @@ -34,7 +34,7 @@ public: }; static ThrowCompletionOr> create(VM&); - static ThrowCompletionOr> initialize_host_defined_realm(VM&, Function create_global_object, Function create_global_this_value); + static ThrowCompletionOr> initialize_host_defined_realm(VM&, NOESCAPE Function create_global_object, NOESCAPE Function create_global_this_value); void set_global_object(Object* global_object, Object* this_value); diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 908883767e..1625f0bd02 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -42,7 +42,7 @@ public: struct CustomData { virtual ~CustomData() = default; - virtual void spin_event_loop_until(JS::SafeFunction goal_condition) = 0; + virtual void spin_event_loop_until(NOESCAPE JS::SafeFunction goal_condition) = 0; }; static ErrorOr> create(OwnPtr = {}); diff --git a/Userland/Libraries/LibTest/Randomized/RandomnessSource.h b/Userland/Libraries/LibTest/Randomized/RandomnessSource.h index 7c8da66963..c41a544db0 100644 --- a/Userland/Libraries/LibTest/Randomized/RandomnessSource.h +++ b/Userland/Libraries/LibTest/Randomized/RandomnessSource.h @@ -26,7 +26,7 @@ public: static RandomnessSource live() { return RandomnessSource(RandomRun(), true); } static RandomnessSource recorded(RandomRun const& run) { return RandomnessSource(run, false); } RandomRun& run() { return m_run; } - u64 draw_value(u64 max, Function random_generator) + u64 draw_value(u64 max, NOESCAPE Function random_generator) { // Live: use the random generator and remember the value. if (m_is_live) { diff --git a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.h b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.h index bdafaea761..9d08d190c5 100644 --- a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.h +++ b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.h @@ -84,7 +84,7 @@ ErrorOr initialize_main_thread_vm(); JS::VM& main_thread_vm(); void queue_mutation_observer_microtask(DOM::Document const&); -NonnullOwnPtr create_a_new_javascript_realm(JS::VM&, Function create_global_object, Function create_global_this_value); +NonnullOwnPtr create_a_new_javascript_realm(JS::VM&, NOESCAPE Function create_global_object, NOESCAPE Function create_global_this_value); void invoke_custom_element_reactions(Vector>& element_queue); } diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index 24c6f94b5d..33385221fe 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -134,9 +134,9 @@ public: int client_width() const; int client_height() const; - void for_each_attribute(Function) const; + void for_each_attribute(NOESCAPE Function) const; - void for_each_attribute(Function) const; + void for_each_attribute(NOESCAPE Function) const; bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const; Vector const& class_names() const { return m_classes; } diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h index 8594928890..4bd953bd2f 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.h @@ -38,8 +38,8 @@ public: TaskQueue& microtask_queue() { return *m_microtask_queue; } TaskQueue const& microtask_queue() const { return *m_microtask_queue; } - void spin_until(JS::SafeFunction goal_condition); - void spin_processing_tasks_with_source_until(Task::Source, JS::SafeFunction goal_condition); + void spin_until(NOESCAPE JS::SafeFunction goal_condition); + void spin_processing_tasks_with_source_until(Task::Source, NOESCAPE JS::SafeFunction goal_condition); void process(); // https://html.spec.whatwg.org/multipage/browsing-the-web.html#termination-nesting-level diff --git a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h index 41471f7ad5..ba1ff5ac96 100644 --- a/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h +++ b/Userland/Libraries/LibWeb/HTML/EventLoop/TaskQueue.h @@ -34,8 +34,8 @@ public: return m_tasks.take_first(); } - void remove_tasks_matching(Function); - JS::MarkedVector> take_tasks_matching(Function); + void remove_tasks_matching(NOESCAPE Function); + JS::MarkedVector> take_tasks_matching(NOESCAPE Function); Task const* last_added_task() const; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h index 07341831b2..71fbe457d1 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h @@ -221,7 +221,7 @@ public: m_data.get>>().clear(); } - void for_each_attribute(Function callback) const + void for_each_attribute(NOESCAPE Function callback) const { VERIFY(is_start_tag() || is_end_tag()); auto* ptr = tag_attributes(); @@ -233,7 +233,7 @@ public: } } - void for_each_attribute(Function callback) + void for_each_attribute(NOESCAPE Function callback) { VERIFY(is_start_tag() || is_end_tag()); auto* ptr = tag_attributes(); diff --git a/Userland/Libraries/LibWeb/Platform/EventLoopPlugin.h b/Userland/Libraries/LibWeb/Platform/EventLoopPlugin.h index 6101a1728f..536fd0246d 100644 --- a/Userland/Libraries/LibWeb/Platform/EventLoopPlugin.h +++ b/Userland/Libraries/LibWeb/Platform/EventLoopPlugin.h @@ -19,7 +19,7 @@ public: virtual ~EventLoopPlugin(); - virtual void spin_until(JS::SafeFunction goal_condition) = 0; + virtual void spin_until(NOESCAPE JS::SafeFunction goal_condition) = 0; virtual void deferred_invoke(JS::SafeFunction) = 0; virtual NonnullRefPtr create_timer() = 0; virtual void quit() = 0;