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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 517793003: Reorder AudioMessageFilter shutdown. Remove spammy DCHECK. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 607
608 // Shutdown in reverse of the initialization order. 608 // Shutdown in reverse of the initialization order.
609 if (devtools_agent_message_filter_.get()) { 609 if (devtools_agent_message_filter_.get()) {
610 RemoveFilter(devtools_agent_message_filter_.get()); 610 RemoveFilter(devtools_agent_message_filter_.get());
611 devtools_agent_message_filter_ = NULL; 611 devtools_agent_message_filter_ = NULL;
612 } 612 }
613 613
614 RemoveFilter(audio_input_message_filter_.get()); 614 RemoveFilter(audio_input_message_filter_.get());
615 audio_input_message_filter_ = NULL; 615 audio_input_message_filter_ = NULL;
616 616
617 RemoveFilter(audio_message_filter_.get());
618 audio_message_filter_ = NULL;
619
620 #if defined(ENABLE_WEBRTC) 617 #if defined(ENABLE_WEBRTC)
621 RTCPeerConnectionHandler::DestructAllHandlers(); 618 RTCPeerConnectionHandler::DestructAllHandlers();
622 619
623 peer_connection_factory_.reset(); 620 peer_connection_factory_.reset();
624 #endif 621 #endif
625 RemoveFilter(vc_manager_->video_capture_message_filter()); 622 RemoveFilter(vc_manager_->video_capture_message_filter());
626 vc_manager_.reset(); 623 vc_manager_.reset();
627 624
628 RemoveFilter(db_message_filter_.get()); 625 RemoveFilter(db_message_filter_.get());
629 db_message_filter_ = NULL; 626 db_message_filter_ = NULL;
630 627
631 // Shutdown the file thread if it's running. 628 // Shutdown the file thread if it's running.
632 if (file_thread_) 629 if (file_thread_)
633 file_thread_->Stop(); 630 file_thread_->Stop();
634 631
635 if (compositor_output_surface_filter_.get()) { 632 if (compositor_output_surface_filter_.get()) {
636 RemoveFilter(compositor_output_surface_filter_.get()); 633 RemoveFilter(compositor_output_surface_filter_.get());
637 compositor_output_surface_filter_ = NULL; 634 compositor_output_surface_filter_ = NULL;
638 } 635 }
639 636
640 media_thread_.reset(); 637 media_thread_.reset();
638
639 // AudioMessageFilter may be accessed on |media_thread_|, so shutdown after.
640 RemoveFilter(audio_message_filter_.get());
641 audio_message_filter_ = NULL;
642
641 compositor_thread_.reset(); 643 compositor_thread_.reset();
642 input_handler_manager_.reset(); 644 input_handler_manager_.reset();
643 if (input_event_filter_.get()) { 645 if (input_event_filter_.get()) {
644 RemoveFilter(input_event_filter_.get()); 646 RemoveFilter(input_event_filter_.get());
645 input_event_filter_ = NULL; 647 input_event_filter_ = NULL;
646 } 648 }
647 649
648 // RemoveEmbeddedWorkerRoute may be called while deleting 650 // RemoveEmbeddedWorkerRoute may be called while deleting
649 // EmbeddedWorkerDispatcher. So it must be deleted before deleting 651 // EmbeddedWorkerDispatcher. So it must be deleted before deleting
650 // RenderThreadImpl. 652 // RenderThreadImpl.
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 hidden_widget_count_--; 1655 hidden_widget_count_--;
1654 1656
1655 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1657 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1656 return; 1658 return;
1657 } 1659 }
1658 1660
1659 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1661 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1660 } 1662 }
1661 1663
1662 } // namespace content 1664 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698