Commit 71e9e597 authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

[ModuleDatabase] Don't reset the idle timer for known modules

A load notification for a known module doesn't add any work to the
ModuleDatabase, so this would only mean an observer needs to wait for
the idle timeout to pass before receiving the OnModuleDatabaseIdle()
event.

This was especially annoying when visiting chrome://conflicts. A new
renderer would be created and the ModuleDatabase would get notified for
all the modules loading in that process, therefore ensuring that
loading the page would take at least as long as the idle timeout.

Change-Id: I3cd2c2ef1d905b210e13f3838a4fb864a9ea371b
Reviewed-on: https://chromium-review.googlesource.com/969111
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544160}
parent dd308ef2
......@@ -141,9 +141,6 @@ void ModuleDatabase::OnModuleLoad(content::ProcessType process_type,
return;
}
has_started_processing_ = true;
idle_timer_.Reset();
auto* module_info =
FindOrCreateModuleInfo(module_path, module_size, module_time_date_stamp);
......@@ -201,8 +198,12 @@ ModuleDatabase::ModuleInfo* ModuleDatabase::FindOrCreateModuleInfo(
std::forward_as_tuple());
// New modules must be inspected.
if (result.second)
if (result.second) {
has_started_processing_ = true;
idle_timer_.Reset();
module_inspector_.AddModule(result.first->first);
}
return &(*result.first);
}
......
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