Jason Simmons 430bed2f4f Ensure that the SingleFrameCodec stays alive until the ImageDecoder invokes its callback (flutter/engine#10297)
SingleFrameCodec had been holding a persistent handle to the peer Dart object
while waiting for the decoder callback.  However, Dart code could call
Codec.dispose during that interval, which would cause the Dart peer to drop
its reference to the SingleFrameCodec and potentially delete the
SingleFrameCodec.

Fixes https://github.com/flutter/flutter/issues/36631
2019-07-31 14:58:44 -07:00
..