mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LanguageServers: Don't VERIFY that set_todo_entries callback exists
The callback may not exist if the CodeComprehensionEngine is running in the context of tests (i.e CppLanguageServer -t).
This commit is contained in:
parent
4123be7639
commit
ab3aa0759a
Notes:
sideshowbarker
2024-07-18 11:23:11 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/ab3aa0759a9 Pull-request: https://github.com/SerenityOS/serenity/pull/8260 Reviewed-by: https://github.com/alimpfard
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,7 @@ CodeComprehensionEngine::~CodeComprehensionEngine()
|
|||
}
|
||||
void CodeComprehensionEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations)
|
||||
{
|
||||
// Callback may not be configured if we're running tests
|
||||
if (!set_declarations_of_document_callback)
|
||||
return;
|
||||
|
||||
|
@ -34,7 +35,9 @@ void CodeComprehensionEngine::set_declarations_of_document(const String& filenam
|
|||
|
||||
void CodeComprehensionEngine::set_todo_entries_of_document(String const& filename, Vector<Cpp::Parser::TodoEntry>&& todo_entries)
|
||||
{
|
||||
VERIFY(set_todo_entries_of_document_callback);
|
||||
// Callback may not be configured if we're running tests
|
||||
if (!set_todo_entries_of_document_callback)
|
||||
return;
|
||||
set_todo_entries_of_document_callback(filename, move(todo_entries));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue