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

Side by Side Diff: components/scheduler/child/single_thread_idle_task_runner.cc

Issue 2053233002: Make sure FrameScheduler is cleared when LocalFrame::detach() finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 "components/scheduler/child/single_thread_idle_task_runner.h" 5 #include "components/scheduler/child/single_thread_idle_task_runner.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/trace_event/blame_context.h" 8 #include "base/trace_event/blame_context.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 if (blame_context_) 77 if (blame_context_)
78 blame_context_->Enter(); 78 blame_context_->Enter();
79 idle_task.Run(deadline); 79 idle_task.Run(deadline);
80 if (blame_context_) 80 if (blame_context_)
81 blame_context_->Leave(); 81 blame_context_->Leave();
82 delegate_->DidProcessIdleTask(); 82 delegate_->DidProcessIdleTask();
83 } 83 }
84 84
85 void SingleThreadIdleTaskRunner::SetBlameContext( 85 void SingleThreadIdleTaskRunner::SetBlameContext(
86 base::trace_event::BlameContext* blame_context) { 86 base::trace_event::BlameContext* blame_context) {
87 blame_context_ = blame_context; 87 blame_context_ = blame_context ? blame_context->weak_ptr() : nullptr;
Primiano Tucci (use gerrit) 2016/06/10 07:50:35 how do you know that here you are on the right thr
Xiaocheng 2016/06/10 08:07:08 Are you implying any potentially risky design? In
88 } 88 }
89 89
90 } // namespace scheduler 90 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698