Commit ddf4446b authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

[PM] Add a comment to PerformanceManager::GetTaskRunner

Change-Id: I7848f077a6b67623c2d3d6eb48090f7447dfce5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230329Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775268}
parent 7cd99521
......@@ -136,6 +136,14 @@ class PerformanceManager {
return static_cast<DerivedType*>(object);
}
// Returns the performance manager graph task runner. This is safe to call
// from any thread at any time between the creation of the thread pool and its
// destruction.
//
// NOTE: Tasks posted to this sequence from any thread but the UI thread, or
// on the UI thread after IsAvailable() returns false, cannot safely access
// the graph, graphowned objects or other performance manager related objects.
// In practice it's preferable to use CallOnGraph() whenever possible.
static scoped_refptr<base::SequencedTaskRunner> GetTaskRunner();
protected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment