From 5a604f8e79e5baf6d8555e27063ba571069162f8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 12 Jul 2016 14:23:38 +0900 Subject: [PATCH] Destroy the native tray in next tick --- atom/browser/api/atom_api_tray.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index 6bbad738b32d..e16ff822ef39 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -29,6 +29,8 @@ Tray::Tray(v8::Isolate* isolate, mate::Handle image) } Tray::~Tray() { + // Destroy the native tray in next tick. + base::MessageLoop::current()->DeleteSoon(FROM_HERE, tray_icon_.release()); } // static