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

Unified Diff: chrome/common/extensions/extension_resource.cc

Issue 3872002: Thread IO safety: file_util annotated, IO thread blocked from doing IO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 10 years, 2 months 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
« no previous file with comments | « chrome/browser/service/service_process_control.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_resource.cc
diff --git a/chrome/common/extensions/extension_resource.cc b/chrome/common/extensions/extension_resource.cc
index d3c58985c099cdb6031082f6aafe2c0b9cf711b1..be22ec9aff4335881b2640b974d165d033e45c32 100644
--- a/chrome/common/extensions/extension_resource.cc
+++ b/chrome/common/extensions/extension_resource.cc
@@ -6,6 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/thread_restrictions.h"
PlatformThreadId ExtensionResource::file_thread_id_ = 0;
@@ -45,6 +46,12 @@ const FilePath& ExtensionResource::GetFilePath() const {
// static
FilePath ExtensionResource::GetFilePathOnAnyThreadHack(
const FilePath& extension_root, const FilePath& relative_path) {
+ // This function is a hack, and causes us to block the IO thread.
+ // Fixing
+ // http://code.google.com/p/chromium/issues/detail?id=59849
+ // would also fix this. Suppress the error for now.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
// We need to resolve the parent references in the extension_root
// path on its own because IsParent doesn't like parent references.
FilePath clean_extension_root(extension_root);
« no previous file with comments | « chrome/browser/service/service_process_control.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698