Fix a potential crash on exit due changes made for multithreaded message loop CEF (caused by browser still trying to paint during shutdown).