ladybird/Libraries/LibWeb/Page
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
..
EventHandler.cpp LibWeb: Add a PageClient callback for image context menu requests 2020-10-02 19:02:47 +02:00
EventHandler.h LibWeb: Allow layout nodes to receive and track mouse events 2020-09-11 18:42:43 +02:00
Frame.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
Frame.h LibWeb: Rename PageView => InProcessWebView 2020-08-17 18:05:35 +02:00
Page.cpp LibWeb: Add OutOfProcessWebView::load_html() 2020-10-08 23:20:52 +02:00
Page.h LibWeb: Add OutOfProcessWebView::load_html() 2020-10-08 23:20:52 +02:00