Commit e246e0f0 authored by Alex Clarke's avatar Alex Clarke Committed by Commit Bot

AudioWorkletObjectProxy::DidEvaluateModuleScript to post a loading task.

We wish to prioritize loading and compositing tasks till FCP, but
that changes the order in which the task posted by
AudioWorkletObjectProxy::DidEvaluateModuleScript runs in relation to
other loading tasks (it's called by
WorkletModuleTreeClient::NotifyModuleTreeLoadFinished).

Changing this task to be TaskType::kInternalLoad preserves the
original order with the new scheduler policy.

Bug: 971191
Change-Id: I1d80a9c7dd7e9c97b7303b087506caa9e51981d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819255
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699684}
parent 1aebd5f7
...@@ -41,8 +41,12 @@ void AudioWorkletObjectProxy::DidEvaluateModuleScript(bool success) { ...@@ -41,8 +41,12 @@ void AudioWorkletObjectProxy::DidEvaluateModuleScript(bool success) {
if (processor_info_list->size() == 0) if (processor_info_list->size() == 0)
return; return;
// This method is called by a loading task which calls
// WorkletModuleTreeClient::NotifyModuleTreeLoadFinished and
// SynchronizeWorkletProcessorInfoList needs to run in FIFO order with other
// loading tasks.
PostCrossThreadTask( PostCrossThreadTask(
*GetParentExecutionContextTaskRunners()->Get(TaskType::kInternalMedia), *GetParentExecutionContextTaskRunners()->Get(TaskType::kInternalLoading),
FROM_HERE, FROM_HERE,
CrossThreadBindOnce( CrossThreadBindOnce(
&AudioWorkletMessagingProxy::SynchronizeWorkletProcessorInfoList, &AudioWorkletMessagingProxy::SynchronizeWorkletProcessorInfoList,
......
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