electron/brightray/browser
Adam Roben ae1e26bddd Fix a hang on quit when application cache is used
If you navigated to a page that used the HTML Application Cache, you'd see a
hang on quit with a backtrace like so:

+     2825 content::ContentMain(int, char const**, content::ContentMainDelegate*)  (in libchromiumcontent.dylib) + 64  [0xb33190]
+       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x96b261  [0xb34261]
+         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x96a409  [0xb33409]
+           2825 content::BrowserMain(content::MainFunctionParams const&)  (in libchromiumcontent.dylib) + 200  [0x14290b8]
+             2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x1265426  [0x142e426]
+               2825 content::BrowserMainLoop::~BrowserMainLoop()  (in libchromiumcontent.dylib) + 17  [0x14294a1]
+                 2825 content::BrowserMainLoop::~BrowserMainLoop()  (in libchromiumcontent.dylib) + 357  [0x1429625]
+                     2825 brightray::BrowserMainParts::~BrowserMainParts()  (in ) + 70  [0x68df6]
+                       2825 scoped_ptr<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr()  (in ) + 23  [0x68ff7]
+                         2825 scoped_ptr<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr()  (in ) + 23  [0x69297]
+                           2825 base::internal::scoped_ptr_impl<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr_impl()  (in ) + 23  [0x692b7]
+                             2825 base::internal::scoped_ptr_impl<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr_impl()  (in ) + 50  [0x692f2]
+                               2825 base::DefaultDeleter<brightray::BrowserContext>::operator()(brightray::BrowserContext*) const  (in ) + 46  [0x6916e]
+                                   2825 brightray::BrowserContext::~BrowserContext()  (in ) + 127  [0x672bf]
+                                     2825 base::SupportsUserData::~SupportsUserData()  (in libchromiumcontent.dylib) + 57  [0xccc019]
+                                       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0xb03230  [0xccc230]
+                                         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0xb0324e  [0xccc24e]
+                                           2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x14c4239  [0x168d239]
+                                             2825 content::StoragePartitionImpl::~StoragePartitionImpl()  (in libchromiumcontent.dylib) + 17  [0x16899a1]
+                                               2825 content::StoragePartitionImpl::~StoragePartitionImpl()  (in libchromiumcontent.dylib) + 491  [0x1689bab]
+                                                 2825 content::ChromeAppCacheService::DeleteOnCorrectThread() const  (in libchromiumcontent.dylib) + 66  [0x1424f32]
+                                                   2825 content::ChromeAppCacheService::~ChromeAppCacheService()  (in libchromiumcontent.dylib) + 50  [0x1424e32]
+                                                     2825 appcache::AppCacheService::~AppCacheService()  (in libchromiumcontent.dylib) + 301  [0x2b8ad2d]
+                                                       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x29c9b81  [0x2b92b81]
+                                                         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x29c9da4  [0x2b92da4]
+                                                           2825 appcache::AppCacheDiskCache::~AppCacheDiskCache()  (in libchromiumcontent.dylib) + 17  [0x2b78c71]
+                                                             2825 appcache::AppCacheDiskCache::~AppCacheDiskCache()  (in libchromiumcontent.dylib) + 135  [0x2b78d17]
+                                                               2825 disk_cache::BackendImpl::~BackendImpl()  (in libchromiumcontent.dylib) + 17  [0x25979a1]
+                                                                 2825 disk_cache::BackendImpl::~BackendImpl()  (in libchromiumcontent.dylib) + 305  [0x2597af1]
+                                                                   2825 base::WaitableEvent::Wait()  (in libchromiumcontent.dylib) + 50  [0xccd942]
+                                                                     2825 base::WaitableEvent::TimedWait(base::TimeDelta const&)  (in libchromiumcontent.dylib) + 347  [0xccdb3b]
+                                                                       2825 base::ConditionVariable::Wait()  (in libchromiumcontent.dylib) + 35  [0xcccbb3]
+                                                                         2825 pthread_cond_wait$UNIX2003  (in libsystem_c.dylib) + 71  [0x964d3089]
+                                                                           2825 _pthread_cond_wait  (in libsystem_c.dylib) + 833  [0x9644d280]
+                                                                             2825 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x94b8e8e2]

BackendImpl was waiting on BrowserThread::CACHE, but that thread had already
been stopped. The solution is to destroy the BrowserContext before threads have
been stopped. We now do this in BrowserMainParts::PostMainMessageLoopRun, which
matches content_shell.
2013-10-23 12:16:25 -04:00
..
mac Size dev tools correctly when starting out docked to the right 2013-04-16 21:06:07 -04:00
media Make MediaStreamDevicesController::Accept/Deny public again 2013-10-07 17:04:40 -04:00
win Implement undocked dev tools on Windows 2013-06-04 14:33:29 -04:00
browser_client.cc Enable navigator.webkitGetUserMedia() 2013-07-31 11:08:45 -07:00
browser_client.h Enable navigator.webkitGetUserMedia() 2013-07-31 11:08:45 -07:00
browser_context.cc Update ResourceContext for Chrome 30 2013-10-07 16:31:58 -04:00
browser_context.h BrowserContext::RequestMIDISysExPermission was added in Chrome 30 2013-10-07 16:31:57 -04:00
browser_main_parts.cc Fix a hang on quit when application cache is used 2013-10-23 12:16:25 -04:00
browser_main_parts.h Fix a hang on quit when application cache is used 2013-10-23 12:16:25 -04:00
browser_main_parts_mac.mm Bump the base SDK and deployment target to 10.8 2013-03-28 17:50:07 -04:00
default_web_contents_delegate.cc Enable navigator.webkitGetUserMedia() 2013-07-31 11:08:45 -07:00
default_web_contents_delegate.h Enable navigator.webkitGetUserMedia() 2013-07-31 11:08:45 -07:00
default_web_contents_delegate_mac.mm Make keyboard shortcuts work on Mac 2013-03-14 13:50:15 -04:00
devtools_ui.cc Cleanup unused headers, data members and functions. 2013-10-11 07:17:53 -04:00
devtools_ui.h Cleanup unused headers, data members and functions. 2013-10-11 07:17:53 -04:00
download_manager_delegate.cc Avoid a crash when starting a download by disallowing downloads 2013-07-24 07:56:55 -04:00
download_manager_delegate.h Avoid a crash when starting a download by disallowing downloads 2013-07-24 07:56:55 -04:00
inspectable_web_contents.cc Fix flashing in WebContents we create 2013-10-10 16:24:22 -04:00
inspectable_web_contents.h 💄 2013-04-22 20:41:58 +08:00
inspectable_web_contents_impl.cc Cleanup unused headers, data members and functions. 2013-10-11 07:17:53 -04:00
inspectable_web_contents_impl.h Cleanup unused headers, data members and functions. 2013-10-11 07:17:53 -04:00
inspectable_web_contents_view.h Support docking the devtools on the right side of the window 2013-03-27 11:20:21 -04:00
inspectable_web_contents_view_mac.h Update for move of scoped_nsobject header and namespace 2013-10-07 16:31:57 -04:00
inspectable_web_contents_view_mac.mm Support docking the devtools on the right side of the window 2013-03-27 11:20:21 -04:00
network_delegate.cc Initial commit 2013-03-13 15:31:24 -04:00
network_delegate.h Allow clients to supply their own NetworkDelegate implementation 2013-07-17 10:21:33 -04:00
notification_presenter.h Implement Notification.close() 2013-03-29 09:36:07 -04:00
notification_presenter_mac.h Update for move of scoped_nsobject header and namespace 2013-10-07 16:31:57 -04:00
notification_presenter_mac.mm Update for move of scoped_nsobject header and namespace 2013-10-07 16:31:57 -04:00
url_request_context_getter.cc URLRequestContextStorage::set_http_server_properties takes a scoped_ptr in Chrome 30 2013-10-07 16:31:58 -04:00
url_request_context_getter.h Allow clients to supply their own NetworkDelegate implementation 2013-07-17 10:21:33 -04:00
web_ui_controller_factory.cc Use the "chrome-devtools://" scheme to open devtools. 2013-10-10 16:56:52 -04:00
web_ui_controller_factory.h Use the "chrome-devtools://" scheme to open devtools. 2013-10-10 16:56:52 -04:00