More templates!
Created attachment 322519 [details] patch
Created attachment 322521 [details] patch
Created attachment 322523 [details] patch
Created attachment 322525 [details] patch
Comment on attachment 322525 [details] patch r=me Now that it's in five places, I think it's time to make a helper function that does the static_assert and reinterpret_cast on WeakReference<T>. Maybe call it static_weak_pointer_cast.
Created attachment 322536 [details] patch
I added two helpers called weak_reference_downcast and weak_reference_upcast (the static_assert is the other way round).
Created attachment 322539 [details] patch
https://trac.webkit.org/r222793
<rdar://problem/34795432>
Nice!