Commit 9a182334 authored by Xiyuan Xia's avatar Xiyuan Xia Committed by Commit Bot

Fix DBus threading issue in PepperTCPSocketMessageFilter dtor

PepperTCPSocketMessageFilter could be released on IO thread
with an outstanding |firewall_hole_| and indirectly calls
dbus code on IO thread. The CL makes sure |firewall_hole_|
is deleted on UI thread.

Bug: 989072
Change-Id: I9266c21a96fa5b931f81d25bc6c8e91293a5e9a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726235Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682399}
parent 0e800fae
...@@ -124,6 +124,13 @@ PepperTCPSocketMessageFilter::~PepperTCPSocketMessageFilter() { ...@@ -124,6 +124,13 @@ PepperTCPSocketMessageFilter::~PepperTCPSocketMessageFilter() {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (host_) if (host_)
host_->RemoveInstanceObserver(instance_, this); host_->RemoveInstanceObserver(instance_, this);
#if defined(OS_CHROMEOS)
// Close the firewall hole on UI thread if there is one.
if (firewall_hole_) {
BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE,
std::move(firewall_hole_));
}
#endif // defined(OS_CHROMEOS)
--g_num_tcp_filter_instances; --g_num_tcp_filter_instances;
} }
......
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