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

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

Issue 675423002: ServiceWorker: Fix data race in shutdown sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 RemoveFilter(audio_message_filter_.get()); 642 RemoveFilter(audio_message_filter_.get());
643 audio_message_filter_ = NULL; 643 audio_message_filter_ = NULL;
644 644
645 compositor_thread_.reset(); 645 compositor_thread_.reset();
646 input_handler_manager_.reset(); 646 input_handler_manager_.reset();
647 if (input_event_filter_.get()) { 647 if (input_event_filter_.get()) {
648 RemoveFilter(input_event_filter_.get()); 648 RemoveFilter(input_event_filter_.get());
649 input_event_filter_ = NULL; 649 input_event_filter_ = NULL;
650 } 650 }
651 651
652 // RemoveEmbeddedWorkerRoute may be called while deleting
653 // EmbeddedWorkerDispatcher. So it must be deleted before deleting
654 // RenderThreadImpl.
655 embedded_worker_dispatcher_.reset();
656
657 // Ramp down IDB before we ramp down WebKit (and V8), since IDB classes might 652 // Ramp down IDB before we ramp down WebKit (and V8), since IDB classes might
658 // hold pointers to V8 objects (e.g., via pending requests). 653 // hold pointers to V8 objects (e.g., via pending requests).
659 main_thread_indexed_db_dispatcher_.reset(); 654 main_thread_indexed_db_dispatcher_.reset();
660 655
661 main_thread_compositor_task_runner_ = NULL; 656 main_thread_compositor_task_runner_ = NULL;
662 657
663 if (blink_platform_impl_) 658 if (blink_platform_impl_)
664 blink::shutdown(); 659 blink::shutdown();
665 660
661 // RemoveEmbeddedWorkerRoute may be called while deleting
662 // EmbeddedWorkerDispatcher. So it must be deleted before deleting
663 // RenderThreadImpl.
664 embedded_worker_dispatcher_.reset();
horo 2014/10/27 13:38:25 Could you please write the comments about the race
Kunihiko Sakamoto 2014/10/28 01:12:27 Done.
665
666 lazy_tls.Pointer()->Set(NULL); 666 lazy_tls.Pointer()->Set(NULL);
667 667
668 // TODO(port) 668 // TODO(port)
669 #if defined(OS_WIN) 669 #if defined(OS_WIN)
670 // Clean up plugin channels before this thread goes away. 670 // Clean up plugin channels before this thread goes away.
671 NPChannelBase::CleanupChannels(); 671 NPChannelBase::CleanupChannels();
672 #endif 672 #endif
673 } 673 }
674 674
675 bool RenderThreadImpl::Send(IPC::Message* msg) { 675 bool RenderThreadImpl::Send(IPC::Message* msg) {
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 hidden_widget_count_--; 1584 hidden_widget_count_--;
1585 1585
1586 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1586 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1587 return; 1587 return;
1588 } 1588 }
1589 1589
1590 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1590 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1591 } 1591 }
1592 1592
1593 } // namespace content 1593 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698