0

[Extensions] Chromium crashed in single-process mode on fresh launch.

With current implementation, in-process utility thread clean up is taken care by IO thread on detecting that concern IPC communication channel been closed. And utility thread has ThreadRestrictions to disallowed IO. Apparently it asserts (SIG-ABORT) before performing join in pre-check.

With this CL we are making sure that before IO thread waits for utility thread's cleanup it enables ThreadRestrictions to allow IO for utility thread so that it can join. This avoids chromium crash on fresh launch.

BUG=421007
R=mpcomplete@chromium.org

Review URL: https://codereview.chromium.org/683083002

Cr-Commit-Position: refs/heads/master@{#302112}
This commit is contained in:
pritam.nikam
2014-10-30 11:25:48 -07:00
committed by Commit bot
parent 2d0c8cfc2d
commit e82a809ff6

@ -18,7 +18,10 @@ InProcessUtilityThread::InProcessUtilityThread(const std::string& channel_id)
}
InProcessUtilityThread::~InProcessUtilityThread() {
// Wait till in-process utility thread finishes clean up.
bool previous_value = base::ThreadRestrictions::SetIOAllowed(true);
Stop();
base::ThreadRestrictions::SetIOAllowed(previous_value);
}
void InProcessUtilityThread::Init() {