Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1908)

Unified Diff: content/renderer/p2p/port_allocator.cc

Issue 1976263002: Stop asynchronously deleting the network manager in P2PPortAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/p2p/port_allocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/port_allocator.cc
diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc
index c9bc9fadf1dd6720aa2201e3704c7187585feaca..f2a9f1d912c19d1b91ef6a4f0515fd0c1485839e 100644
--- a/content/renderer/p2p/port_allocator.cc
+++ b/content/renderer/p2p/port_allocator.cc
@@ -21,14 +21,12 @@ P2PPortAllocator::P2PPortAllocator(
std::unique_ptr<rtc::NetworkManager> network_manager,
rtc::PacketSocketFactory* socket_factory,
const Config& config,
- const GURL& origin,
- const scoped_refptr<base::SingleThreadTaskRunner> task_runner)
+ const GURL& origin)
: cricket::BasicPortAllocator(network_manager.get(), socket_factory),
network_manager_(std::move(network_manager)),
socket_dispatcher_(socket_dispatcher),
config_(config),
- origin_(origin),
- network_manager_task_runner_(task_runner) {
+ origin_(origin) {
uint32_t flags = 0;
if (!config_.enable_multiple_routes) {
flags |= cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION;
@@ -51,13 +49,6 @@ P2PPortAllocator::P2PPortAllocator(
}
}
-// TODO(guoweis): P2PPortAllocator is also deleted in the wrong thread
-// here. It's created in signaling thread, and held by webrtc::PeerConnection,
-// only used on worker thread. The destructor is invoked on signaling thread
-// again. crbug.com/535761. DeleteSoon can be removed once the bug is fixed.
-P2PPortAllocator::~P2PPortAllocator() {
- network_manager_task_runner_->DeleteSoon(FROM_HERE,
- network_manager_.release());
-}
+P2PPortAllocator::~P2PPortAllocator() {}
Sergey Ulanov 2016/05/13 19:44:21 Maybe add ThreadChecker in P2PPortAllocator to mak
} // namespace content
« no previous file with comments | « content/renderer/p2p/port_allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698