diff options
author | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 19:00:51 +0000 |
---|---|---|
committer | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 19:00:51 +0000 |
commit | e669998f4edaa156aafbe2fb93b3e3dae1ebd06c (patch) | |
tree | cf985d58d67619987a03ae33eae38c44b86a04e4 /ceee | |
parent | c69b4c6e6717a4dba83f725285ade67ac4ccd538 (diff) | |
download | chromium_src-e669998f4edaa156aafbe2fb93b3e3dae1ebd06c.zip chromium_src-e669998f4edaa156aafbe2fb93b3e3dae1ebd06c.tar.gz chromium_src-e669998f4edaa156aafbe2fb93b3e3dae1ebd06c.tar.bz2 |
We need to pin Chrome Frame so that it doesn't get stuck on releasing Breakpad.
The Broker interacts with Chrome Frame from a Worker Thread, and if this thread is the last one to release the Chrome Frame COM object, then the Chrome Frame DLL will be relased during CoUninitialize and will try to release Breakpad while the breakpad thread is stuck on the loader lock.
BUG=65116
TEST=Make sure the Broker exists cleanly and in a reasonable amount of time.
Review URL: http://codereview.chromium.org/5522002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-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; } |