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

Side by Side Diff: content/renderer/scheduler/web_scheduler_impl.cc

Issue 1014643002: [renderer]: Fix RendererScheduler shutdown logic to ensure it is shutdown before the MessageLoop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/render_thread_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/scheduler/web_scheduler_impl.h" 5 #include "content/renderer/scheduler/web_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/renderer/scheduler/renderer_scheduler.h" 9 #include "content/renderer/scheduler/renderer_scheduler.h"
10 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 10 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(loading_task_runner_); 74 DCHECK(loading_task_runner_);
75 scoped_ptr<blink::WebThread::Task> scoped_task(task); 75 scoped_ptr<blink::WebThread::Task> scoped_task(task);
76 tracked_objects::Location location(web_location.functionName(), 76 tracked_objects::Location location(web_location.functionName(),
77 web_location.fileName(), -1, nullptr); 77 web_location.fileName(), -1, nullptr);
78 loading_task_runner_->PostTask( 78 loading_task_runner_->PostTask(
79 location, 79 location,
80 base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task))); 80 base::Bind(&WebSchedulerImpl::runTask, base::Passed(&scoped_task)));
81 } 81 }
82 82
83 void WebSchedulerImpl::shutdown() { 83 void WebSchedulerImpl::shutdown() {
84 idle_task_runner_ = nullptr; 84 // TODO(rmcilroy): Delete this method once the blink side is removed.
85 loading_task_runner_ = nullptr;
86 return renderer_scheduler_->Shutdown();
87 } 85 }
88 86
89 } // namespace content 87 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698