summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/importer/firefox_profile_lock.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock.cc b/chrome/browser/importer/firefox_profile_lock.cc
index fff771d..aa66bff 100644
--- a/chrome/browser/importer/firefox_profile_lock.cc
+++ b/chrome/browser/importer/firefox_profile_lock.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/importer/firefox_profile_lock.h"
#include "base/file_path.h"
+#include "base/threading/thread_restrictions.h"
// This class is based on Firefox code in:
// profile/dirserviceprovider/src/nsProfileLock.cpp
@@ -75,5 +76,8 @@ FirefoxProfileLock::FirefoxProfileLock(const FilePath& path) {
}
FirefoxProfileLock::~FirefoxProfileLock() {
+ // Because this destructor happens in first run on the profile import thread,
+ // with no UI to jank, it's ok to allow deletion of the lock here.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
Unlock();
}