Commit e9f85782 authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

Remove task type kInternalWorker.

To simplify the task types. kInternalWorker only had two uses, one of
which was experimental.

Change-Id: I5199741e11da43a7c94d4f69176f301e305e7f50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623613Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662085}
parent 69e8f306
......@@ -191,9 +191,8 @@ enum class TaskType : unsigned char {
// Tasks related to the inspector.
kInternalInspector = 33,
// Tasks related to workers. Tasks with this type are mainly posted by:
// * //third_party/blink/renderer/core/workers
kInternalWorker = 36,
// Obsolete.
// kInternalWorker = 36,
// Translation task that freezes when the frame is not visible.
kInternalTranslation = 55,
......
......@@ -287,7 +287,7 @@ void TaskBase::TaskCompletedOnWorkerThread(v8::Local<v8::Value> v8_result,
PostCrossThreadTask(
*worker_thread_->GetParentExecutionContextTaskRunners()->Get(
TaskType::kInternalWorker),
TaskType::kInternalDefault),
FROM_HERE,
CrossThreadBindOnce(&TaskBase::TaskCompleted,
WrapCrossThreadPersistent(this),
......
......@@ -32,8 +32,7 @@ ParentExecutionContextTaskRunners::ParentExecutionContextTaskRunners(
for (auto type : {TaskType::kNetworking, TaskType::kPostedMessage,
TaskType::kWorkerAnimation, TaskType::kInternalDefault,
TaskType::kInternalLoading, TaskType::kInternalTest,
TaskType::kInternalMedia, TaskType::kInternalInspector,
TaskType::kInternalWorker}) {
TaskType::kInternalMedia, TaskType::kInternalInspector}) {
auto task_runner = context ? context->GetTaskRunner(type)
: Thread::Current()->GetTaskRunner();
task_runners_.insert(type, std::move(task_runner));
......
......@@ -41,7 +41,7 @@ SyncManager* ServiceWorkerRegistrationSync::sync() {
ExecutionContext* execution_context = registration_->GetExecutionContext();
sync_manager_ = SyncManager::Create(
registration_,
execution_context->GetTaskRunner(TaskType::kInternalWorker));
execution_context->GetTaskRunner(TaskType::kInternalIPC));
}
return sync_manager_.Get();
}
......
......@@ -463,10 +463,6 @@ base::Optional<QueueTraits> FrameSchedulerImpl::CreateQueueTraitsForTaskType(
// The TaskType of Inspector tasks needs to be unpausable because they need
// to run even on a paused page.
case TaskType::kInternalInspector:
// The TaskType of worker tasks needs to be unpausable (in addition to
// unthrottled and undeferred) not to prevent service workers that may
// control browser navigation on multiple tabs.
case TaskType::kInternalWorker:
// Some tasks in the tests need to run when objects are paused e.g. to hook
// when recovering from debugger JavaScript statetment.
case TaskType::kInternalTest:
......
......@@ -93,8 +93,6 @@ const char* TaskTypeNames::TaskTypeToString(TaskType task_type) {
return "InternalUserInteraction";
case TaskType::kInternalInspector:
return "InternalInspector";
case TaskType::kInternalWorker:
return "InternalWorker";
case TaskType::kMainThreadTaskQueueV8:
return "MainThreadTaskQueueV8";
case TaskType::kMainThreadTaskQueueCompositor:
......
......@@ -164,7 +164,6 @@ scoped_refptr<base::SingleThreadTaskRunner> WorkerScheduler::GetTaskRunner(
case TaskType::kDeprecatedNone:
case TaskType::kInternalIPC:
case TaskType::kInternalInspector:
case TaskType::kInternalWorker:
case TaskType::kInternalTest:
case TaskType::kInternalNavigation:
// UnthrottledTaskRunner is generally discouraged in future.
......
......@@ -48751,7 +48751,7 @@ Called by update_net_trust_anchors.py.-->
<int value="33" label="InternalInspector"/>
<int value="34" label="InternalAnimation"/>
<int value="35" label="InternalAccessibility"/>
<int value="36" label="InternalWorker"/>
<int value="36" label="InternalWorker (obsolete)"/>
<int value="37" label="MainThreadTaskQueueV8"/>
<int value="38" label="MainThreadTaskQueueCompositor"/>
<int value="39" label="MainThreadTaskQueueDefault"/>
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