Closed HashidaTKS closed 6 months ago
デバッグでVisual Studioから起動したChronosを閉じた際に、以下のcef_log
で例外が発生することがある問題に対処。
LogMessage::~LogMessage() {
std::string str_newline(stream_.str());
cef_log(file_, line_, severity_, str_newline.c_str());
}
上記のサンプルを眺めていて、現在のChronosでシャットダウン時のCefDoMessageLoopWork()
が足りていないのではないかと思い、サンプルに倣い10回実行するように変更。
実際、この修正を入れるとシャットダウン時にcef_log
での例外が発生しなくなった。
Which issue(s) this PR fixes:
N/A
What this PR does / why we need it:
Exceptions may occur at
cef_log
during closing Chronos. The reason why the cef_log throws the exceptions seems that there leave some tasks for CEF. It seems better to callCefDoMessageLoopWork()
multiple times on shutting down.FYI: https://github.com/chromiumembedded/cef/blob/master/tests/shared/browser/main_message_loop_external_pump_win.cc#L93
How to verify the fixed issue:
The steps to verify:
Shutdown Chronos multiple times.
Expected result:
No exception occurs at
cef_log
during shutting down.