Commit e82a809f authored by pritam.nikam's avatar pritam.nikam Committed by Commit bot

[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}
parent 2d0c8cfc
......@@ -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() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment