Commit 0dee9f08 authored by danakj's avatar danakj Committed by Commit Bot

Use RenderFrame::GetTaskRunner in content/renderer/pepper/.

Presubmit complains about using ThreadTaskRunnerHandle in the renderer
saying that we should use GetTaskRunner instead.

** Presubmit Warnings **
base::ThreadTaskRunnerHandle::Get() and base::SequencedTaskRunnerHandle::Get() are deprecated in renderer; please use RenderFrame::GetTaskRunner for production code and blink::scheduler::Get*TaskRunnerForTesting for tests. Please reach out to scheduler-dev@ if you have any questions.
  content/renderer/pepper/plugin_power_saver_helper.cc:87

R=raymes@chromium.org

Bug: 953861
Change-Id: I9b5716d03eb8805e9a57e70dca37a21290fe59cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618146Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662241}
parent c001ea6d
...@@ -84,8 +84,9 @@ void PluginPowerSaverHelper::OnUpdatePluginContentOriginWhitelist( ...@@ -84,8 +84,9 @@ void PluginPowerSaverHelper::OnUpdatePluginContentOriginWhitelist(
if (origin_whitelist.count(it->content_origin)) { if (origin_whitelist.count(it->content_origin)) {
// Because the unthrottle callback may register another peripheral plugin // Because the unthrottle callback may register another peripheral plugin
// and invalidate our iterator, we cannot run it synchronously. // and invalidate our iterator, we cannot run it synchronously.
base::ThreadTaskRunnerHandle::Get()->PostTask( render_frame()
FROM_HERE, std::move(it->unthrottle_callback)); ->GetTaskRunner(blink::TaskType::kInternalDefault)
->PostTask(FROM_HERE, std::move(it->unthrottle_callback));
it = peripheral_plugins_.erase(it); it = peripheral_plugins_.erase(it);
} else { } else {
++it; ++it;
......
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