From 8a1b69479745d072edb37715294408fccb05f1c6 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 8 Dec 2011 15:18:19 +0000 Subject: [PATCH] Mac: The MessageLoop::AutoRunState scope in Run() never exits so clear the state_ variable in the CefMessageLoopForUI destructor to avoid an assertion in the MessageLoop destructor (issue #443). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@413 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/cef_process.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcef/cef_process.cc b/libcef/cef_process.cc index a8ec609b0..b14173bc8 100644 --- a/libcef/cef_process.cc +++ b/libcef/cef_process.cc @@ -21,6 +21,14 @@ public: : is_iterating_(true) { } +#if defined(OS_MACOSX) + virtual ~CefMessageLoopForUI() + { + // On Mac the MessageLoop::AutoRunState scope in Run() never exits so clear + // the state_ variable to avoid an assertion in the MessageLoop destructor. + state_ = NULL; + } +#endif // Returns the MessageLoopForUI of the current thread. static CefMessageLoopForUI* current() {