Move the block from the stack to the heap before assigning it to the weak pointer.
Move the block from the stack to the heap before assigning it to the weak pointer.

In the latest clang, it optimizes how the block should be moved to the heap, as a result, assigning to the weak variable will not trigger it to move to the heap, thus if the block outlives the method scope, accessing the weak variable will lead a crash. Here it calls -copy explicitly so the block will be moved to the heap before assigning it to the weak variable.

Ref: https://reviews.llvm.org/D58514
PiperOrigin-RevId: 238492054

google/eDistantObject,google/eDistantObject,google/eDistantObject