ladybird/Userland
Itamar e16c24bb95 HackStudio: Do not create a new LanguageClient unless needed
Previously, whenever Editor::set_document() was called, we destroyed
the previous LanguageClient instance of the editor and created a new
one.

We now check if the language of the existing LanguageClient matches the
new document, and if so we do not create a new LanguageClient instance.

This fixes an issue where doing "goto definition" would crash
HackStudio. This was probably introduced in 44418cb351.

The crash occurred because when doing "goto definition", we called a
AK::Function callback from the LanguageClient, which internally called
Editor::set_document().

Editor::set_document() destroyed the existing LanguageClient, which
cased a VERIFY in Function::clear() to fail because we were trying to
destroy the AK::Function object while executing inside it.
2021-06-25 18:58:34 +02:00
..
Applets Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Applications Browser: Add alternate shortcut F6 for focusing the location box 2021-06-25 01:01:37 +02:00
Demos Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
DevTools HackStudio: Do not create a new LanguageClient unless needed 2021-06-25 18:58:34 +02:00
DynamicLoader Userland: Port UBSAN implementation to userspace 2021-05-27 15:18:03 +02:00
Games Games: Add Spider 2021-06-24 10:32:53 +02:00
Libraries LibGUI: Add TextEditor::has_document() 2021-06-25 18:58:34 +02:00
Services WindowServer: Scale Mouse movements 2021-06-25 01:49:07 +04:30
Shell Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Utilities Utilities: Validate user with Core::Account in userdel 2021-06-24 17:33:14 +04:30
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00