diff options
Diffstat (limited to 'ceee/ie/broker/chrome_postman.cc')
-rw-r--r-- | ceee/ie/broker/chrome_postman.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ceee/ie/broker/chrome_postman.cc b/ceee/ie/broker/chrome_postman.cc index 03fad32..bc44023 100644 --- a/ceee/ie/broker/chrome_postman.cc +++ b/ceee/ie/broker/chrome_postman.cc @@ -244,6 +244,19 @@ HRESULT ChromePostman::ChromePostmanThread::InitializeChromeFrameHost() { LOG(ERROR) << "Failed to start chrome frame " << com::LogHr(hr); return hr; } + // We need to pin the Chrome Frame DLL so that it doesn't get unloaded + // while we call CoUninitialize in our thread cleanup, otherwise we would + // get stuck on breakpad termination as filed in http://crbug.com/64388. + static bool s_pinned = false; + if (!s_pinned) { + HMODULE unused; + if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_PIN, L"npchrome_frame.dll", + &unused)) { + NOTREACHED() << "Failed to pin Chrome Frame. " << com::LogWe(); + } else { + s_pinned = true; + } + } return hr; } |