Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(981)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2472473002: gpu shader cache: Clarify lifetime/ownership/threadiness of objects. (Closed)
Patch Set: iwyu Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 036c2d7e65021284f38fca1ad00bc5717cad6e10..cd16442cedd8847a2cea31118990c4955fc0d20b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -256,11 +256,13 @@ const base::FilePath::CharType kAecDumpFileNameAddition[] =
#endif
void CacheShaderInfo(int32_t id, base::FilePath path) {
- ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
+ if (ShaderCacheFactory::GetInstance())
+ ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
}
void RemoveShaderInfo(int32_t id) {
- ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id);
+ if (ShaderCacheFactory::GetInstance())
+ ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id);
}
net::URLRequestContext* GetRequestContext(
« no previous file with comments | « content/browser/gpu/shader_disk_cache_unittest.cc ('k') | content/browser/storage_partition_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698