mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 08:29:58 +00:00
7ea264a660
Given the following situation: struct Object : public RefCounted<Object> { RefPtr<Object> parent; } NonnullRefPtr<Object> object = get_some_object(); object = *object->parent; We would previously crash if 'object' was the only strongly referencing pointer to 'parent'. This happened because NonnullRefPtr would unref the outgoing pointee before reffing the incoming pointee. This patch fixes that by implementing NonnullRefPtr assignments using pointer swaps, just like RefPtr already did. |
||
---|---|---|
.. | ||
4chan_catalog.json | ||
Makefile | ||
TestAtomic.cpp | ||
TestBinarySearch.cpp | ||
TestCircularQueue.cpp | ||
TestFileSystemPath.cpp | ||
TestFixedArray.cpp | ||
TestHashMap.cpp | ||
TestJSON.cpp | ||
TestNonnullRefPtr.cpp | ||
TestOptional.cpp | ||
TestQueue.cpp | ||
TestRefPtr.cpp | ||
TestString.cpp | ||
TestStringView.cpp | ||
TestURL.cpp | ||
TestUtf8.cpp | ||
TestVector.cpp | ||
TestWeakPtr.cpp |