Commit 4189fab5 authored by Scott Graham's avatar Scott Graham

Make PathData's LazyInstance Leaky

Running the destructors doesn't offer any benefit, and makes PathService
require an AtExitManager. So instead, make it leaky. This makes
PathService usable earlier in the startup flow.

Separated out of https://codereview.chromium.org/1481703002/.

R=cpu@chromium.org
TBR=cpu@chromium.org
BUG=546288, 561653, 564328

Review URL: https://codereview.chromium.org/1487213004 .

Cr-Commit-Position: refs/heads/master@{#363078}
parent 7de58fed
......@@ -126,19 +126,9 @@ struct PathData {
providers = &base_provider_posix;
#endif
}
~PathData() {
Provider* p = providers;
while (p) {
Provider* next = p->next;
if (!p->is_static)
delete p;
p = next;
}
}
};
static LazyInstance<PathData> g_path_data = LAZY_INSTANCE_INITIALIZER;
static LazyInstance<PathData>::Leaky g_path_data = LAZY_INSTANCE_INITIALIZER;
static PathData* GetPathData() {
return g_path_data.Pointer();
......
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