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

Unified Diff: chrome/browser/extensions/user_script_master.cc

Issue 407043002: Content Verification: Don't access UI-thread objects on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added DCHECK Created 6 years, 5 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/extensions/extension_system_impl.cc ('k') | extensions/browser/content_hash_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/user_script_master.cc
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index e5ac73b908225251607a0454f9aca8bc98291f6e..a3e58465001a36a1748ba245f3d8adb4c3e725f5 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -44,6 +44,7 @@ void VerifyContent(scoped_refptr<ContentVerifier> verifier,
const base::FilePath& extension_root,
const base::FilePath& relative_path,
const std::string& content) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
scoped_refptr<ContentVerifyJob> job(
verifier->CreateJobFor(extension_id, extension_root, relative_path));
if (job.get()) {
@@ -81,11 +82,14 @@ bool LoadScriptContent(const std::string& extension_id,
return false;
}
if (verifier) {
- VerifyContent(verifier,
- extension_id,
- script_file->extension_root(),
- script_file->relative_path(),
- content);
+ content::BrowserThread::PostTask(content::BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&VerifyContent,
+ verifier,
+ extension_id,
+ script_file->extension_root(),
+ script_file->relative_path(),
+ content));
}
}
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.cc ('k') | extensions/browser/content_hash_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698