ladybird/DevTools
Tom 75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
..
HackStudio AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
Inspector Use new format functions in remaining DevTools. (#3755) 2020-10-13 18:34:27 +02:00
IPCCompiler AK: Introduce SourceGenerator::fork(). 2020-10-24 12:56:25 +02:00
Profiler Profiler: Set window title based on the selected View 2020-10-31 13:38:51 +01:00
UserspaceEmulator UserspaceEmulator: Support the first two levels of CPUID 2020-11-08 22:47:02 +01:00
CMakeLists.txt DevTools: Remove VisualBuilder and FormCompiler 2020-10-01 21:07:12 +02:00