Commit cbad4647 authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Replace TaskType::kUnthrottled with kInternalDefault in FontFaceSet

The task runner is used at HandlePendingEventsAndPromises, and I think
an unthorttled task runner is not necessary here.

Note that the original task runner before kUnthrottled was the default
timer task runner, which has gone. Related CLs:
- https://chromium-review.googlesource.com/c/chromium/src/+/822931
  Use the content's kUnthrottled task runner instead of the default
  timer task runner for FontFaceSet.
- https://chromium-review.googlesource.com/c/chromium/src/+/928186
  Remove the defualt timer task runner.

We plan to eliminate kUnthrottled, kUnspecedTimer and kUnspecedLoading
and replace them with appropriate kInternal* task types.

Task type guideline: https://bit.ly/2vMAsQ4

Bug: 836410
Change-Id: I40fb6bd63ee657b68d86f952d6517254ffbf4b51
Reviewed-on: https://chromium-review.googlesource.com/1055031Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558239}
parent f9edc9ae
...@@ -45,11 +45,10 @@ class CORE_EXPORT FontFaceSet : public EventTargetWithInlineData, ...@@ -45,11 +45,10 @@ class CORE_EXPORT FontFaceSet : public EventTargetWithInlineData,
ready_(new ReadyProperty(GetExecutionContext(), ready_(new ReadyProperty(GetExecutionContext(),
this, this,
ReadyProperty::kReady)), ReadyProperty::kReady)),
// TODO(scheduler-dev): Create an internal task type for fonts.
async_runner_(AsyncMethodRunner<FontFaceSet>::Create( async_runner_(AsyncMethodRunner<FontFaceSet>::Create(
this, this,
&FontFaceSet::HandlePendingEventsAndPromises, &FontFaceSet::HandlePendingEventsAndPromises,
context.GetTaskRunner(TaskType::kUnthrottled))) {} context.GetTaskRunner(TaskType::kInternalDefault))) {}
~FontFaceSet() override = default; ~FontFaceSet() override = default;
DEFINE_ATTRIBUTE_EVENT_LISTENER(loading); DEFINE_ATTRIBUTE_EVENT_LISTENER(loading);
......
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