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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user