Repository: flutter
Issue: Service ID platform message is leaked in case the isolate dies before the message is received by the the same.
Labels: engine,from: sanitizer,P2,team-engine,triaged-engine

Caught by leak sanitizer in the `embedder_unittests` harness.
```
Indirect leak of 75 byte(s) in 3 object(s) allocated from:
    #0 0x11574e522 in wrap__Znwm (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x66522)
    #1 0x1078e52d6 in std::__1::__libcpp_allocate(unsigned long, unsigned long) new:259
    #2 0x1079308a5 in std::__1::allocator<unsigned char>::allocate(unsigned long, void const*) memory:1800
    #3 0x10793001e in std::__1::allocator_traits<std::__1::allocator<unsigned char> >::allocate(std::__1::allocator<unsigned char>&, unsigned long) memory:1549
    #4 0x10792f668 in std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::__vallocate(unsigned long) vector:972
    #5 0x10b172cca in std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::vector<std::__1::__wrap_iter<char*> >(std::__1::__wrap_iter<char*>, std::__1::enable_if<(__is_forward_iterator<std::__1::__wrap_iter<char*> >::value) && (is_constructible<unsigned char, std::__1::iterator_traits<std::__1::__wrap_iter<char*> >::reference>::value), std::__1::__wrap_iter<char*> >::type) vector:1212
    #6 0x10b16b33e in std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::vector<std::__1::__wrap_iter<char*> >(std::__1::__wrap_iter<char*>, std::__1::enable_if<(__is_forward_iterator<std::__1::__wrap_iter<char*> >::value) && (is_constructible<unsigned char, std::__1::iterator_traits<std::__1::__wrap_iter<char*> >::reference>::value), std::__1::__wrap_iter<char*> >::type) vector:1205
    #7 0x10b169ec6 in flutter::Engine::Run(flutter::RunConfiguration) engine.cc:160
    #8 0x10b272823 in flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6::operator()() shell.cc:408
    #9 0x10b2721ce in auto fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>::operator()<>() const make_copyable.h:24
    #10 0x10b27212a in decltype(std::__1::forward<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>&>(fp)()) std::__1::__invoke<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>&>(fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>&&&) type_traits:4350
    #11 0x10b27207a in void std::__1::__invoke_void_return_wrapper<void>::__call<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>&>(fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>&&&) __functional_base:349
    #12 0x10b26e381 in std::__1::__function::__func<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6>, std::__1::allocator<fml::internal::CopyableLambda<flutter::Shell::RunEngine(flutter::RunConfiguration, std::__1::function<void (flutter::Engine::RunStatus)>)::$_6> >, void ()>::operator()() functional:1572
    #13 0x10795e03b in std::__1::function<void ()>::operator()() const functional:1923
    #14 0x1090def03 in fml::MessageLoopImpl::FlushTasks(fml::FlushType) message_loop_impl.cc:121
    #15 0x1090dea17 in fml::MessageLoopImpl::RunExpiredTasksNow() message_loop_impl.cc:131
    #16 0x109129d22 in fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) message_loop_darwin.mm:75
    #17 0x7fff5095305f in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (CoreFoundation:x86_64h+0x5a05f)
    #18 0x7fff50952c0b in __CFRunLoopDoTimer (CoreFoundation:x86_64h+0x59c0b)
    #19 0x7fff50952751 in __CFRunLoopDoTimers (CoreFoundation:x86_64h+0x59751)
    #20 0x7fff50933961 in __CFRunLoopRun (CoreFoundation:x86_64h+0x3a961)
    #21 0x7fff50932ebd in CFRunLoopRunSpecific (CoreFoundation:x86_64h+0x39ebd)
    #22 0x10912a40a in fml::MessageLoopDarwin::Run() message_loop_darwin.mm:46
    #23 0x1090de883 in fml::MessageLoopImpl::DoRun() message_loop_impl.cc:90
    #24 0x1090db69a in fml::MessageLoop::Run() message_loop.cc:49
    #25 0x10911f95a in fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0::operator()() const thread.cc:34
    #26 0x10911f6da in decltype(std::__1::forward<fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(fp)()) std::__1::__invoke<fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0&&) type_traits:4350
    #27 0x10911f5d2 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>&, std::__1::__tuple_indices<>) thread:342
    #28 0x10911ec7b in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) thread:352
    #29 0x7fff7ca9e2ea in _pthread_body (libsystem_pthread.dylib:x86_64+0x32ea)

```