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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 1647443002: Delay destructing ChildDiscardableSharedMemoryManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/child/child_thread_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | 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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 channel_->ClearIPCTaskRunner(); 511 channel_->ClearIPCTaskRunner();
512 g_lazy_tls.Pointer()->Set(NULL); 512 g_lazy_tls.Pointer()->Set(NULL);
513 } 513 }
514 514
515 void ChildThreadImpl::Shutdown() { 515 void ChildThreadImpl::Shutdown() {
516 // Delete objects that hold references to blink so derived classes can 516 // Delete objects that hold references to blink so derived classes can
517 // safely shutdown blink in their Shutdown implementation. 517 // safely shutdown blink in their Shutdown implementation.
518 file_system_dispatcher_.reset(); 518 file_system_dispatcher_.reset();
519 quota_dispatcher_.reset(); 519 quota_dispatcher_.reset();
520 WebFileSystemImpl::DeleteThreadSpecificInstance(); 520 WebFileSystemImpl::DeleteThreadSpecificInstance();
521 // ChildDiscardableSharedMemoryManager has to be destroyed while 521 }
522 // |thread_safe_sender_| and |message_loop_| are still valid. 522
523 void ChildThreadImpl::ShutdownDiscardableSharedMemoryManager() {
523 discardable_shared_memory_manager_.reset(); 524 discardable_shared_memory_manager_.reset();
524 } 525 }
525 526
526 void ChildThreadImpl::OnChannelConnected(int32_t peer_pid) { 527 void ChildThreadImpl::OnChannelConnected(int32_t peer_pid) {
527 channel_connected_factory_.InvalidateWeakPtrs(); 528 channel_connected_factory_.InvalidateWeakPtrs();
528 } 529 }
529 530
530 void ChildThreadImpl::OnChannelError() { 531 void ChildThreadImpl::OnChannelError() {
531 on_channel_error_called_ = true; 532 on_channel_error_called_ = true;
532 base::MessageLoop::current()->QuitWhenIdle(); 533 base::MessageLoop::current()->QuitWhenIdle();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void ChildThreadImpl::EnsureConnected() { 732 void ChildThreadImpl::EnsureConnected() {
732 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; 733 VLOG(0) << "ChildThreadImpl::EnsureConnected()";
733 base::Process::Current().Terminate(0, false); 734 base::Process::Current().Terminate(0, false);
734 } 735 }
735 736
736 bool ChildThreadImpl::IsInBrowserProcess() const { 737 bool ChildThreadImpl::IsInBrowserProcess() const {
737 return browser_process_io_runner_; 738 return browser_process_io_runner_;
738 } 739 }
739 740
740 } // namespace content 741 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698