GTK: Fix crash on avatar bubble close
GTK: Fix crash on avatar bubble close

If the avatar bubble closed while opening a profile we would crash.

Here's the sequence of events:
   AvatarMenuBubbleGtk::OpenProfile
      ->SwitchToProfile();
          ...
            AvatarMenuBubbleGtk::OnDestroy()
                delete this;
      this->bubble_->Close();  <--- crash here because this is deleted

To prevent these kinds of errors I changed the OnDestory() code to use MessageLoop::DeleteSoon(). This ensures that there no AvatarMenuBubbleGtk functions are in the backtrace when the bubble is deleted.

BUG=106640
TEST=Reprorduced the crash. Applied my patch and verified that it no longer crashed.


Review URL: http://codereview.chromium.org/8889027

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@113717 0039d316-1c4b-4281-b951-d872f2087c98

ChromiumWebApps/chromium,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,jaruba/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,rogerwang/chromium,mogoweb/chromium-crosswalk,robclark/chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,anirudhSK/chromium,robclark/chromium,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,zcbenz/cefode-chromium,patrickm/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,keishi/chromium,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,markYoungH/chromium.src,Just-D/chromium-1,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,Chilledheart/chromium,hujiajie/pa-chromium,dushu1203/chromium.src,ondra-novak/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,Jonekee/chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,ltilve/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,M4sse/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,robclark/chromium,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,ltilve/chromium,ChromiumWebApps/chromium,ltilve/chromium,jaruba/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,robclark/chromium,jaruba/chromium.src,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,rogerwang/chromium,jaruba/chromium.src,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,rogerwang/chromium,axinging/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,littlstar/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,Chilledheart/chromium,ltilve/chromium,littlstar/chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,robclark/chromium,anirudhSK/chromium,robclark/chromium,rogerwang/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,mogoweb/chromium-crosswalk,keishi/chromium,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,robclark/chromium,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,jaruba/chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,markYoungH/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,Just-D/chromium-1,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,M4sse/chromium.src,Just-D/chromium-1,rogerwang/chromium,Jonekee/chromium.src,ondra-novak/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,rogerwang/chromium,jaruba/chromium.src,anirudhSK/chromium,M4sse/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,littlstar/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,ltilve/chromium,M4sse/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,nacl-webkit/chrome_deps,littlstar/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,dushu1203/chromium.src,jaruba/chromium.src,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,anirudhSK/chromium,rogerwang/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,Jonekee/chromium.src,patrickm/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,patrickm/chromium.src,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,littlstar/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,robclark/chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,timopulkkinen/BubbleFish,keishi/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,patrickm/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,keishi/chromium