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

Unified Diff: third_party/hunspell/google/bdict_reader.cc

Issue 4409002: Add a MD5 checksum to the BDIC header.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: '' Created 10 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
« no previous file with comments | « third_party/hunspell/google/bdict.cc ('k') | third_party/hunspell/google/bdict_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/hunspell/google/bdict_reader.cc
===================================================================
--- third_party/hunspell/google/bdict_reader.cc (revision 65173)
+++ third_party/hunspell/google/bdict_reader.cc (working copy)
@@ -649,8 +649,7 @@
// Check header.
header_ = reinterpret_cast<const BDict::Header*>(bdict_data);
if (header_->signature != BDict::SIGNATURE ||
- header_->major_version != 1 ||
- header_->aff_offset > bdict_length ||
+ header_->major_version > BDict::MAJOR_VERSION ||
header_->dic_offset > bdict_length)
return false;
@@ -664,6 +663,11 @@
if (aff_header_->affix_group_offset + sizeof(uint32) > bdict_length)
return false;
+ // This function is called from SpellCheck::SpellCheckWord(), which blocks
+ // WebKit. To avoid blocking WebKit for a long time, we do not check the MD5
+ // digest here. Instead we check the MD5 digest when Chrome finishes
+ // downloading a dictionary.
+
// Don't set these until the end. This way, NULL bdict_data_ will indicate
// failure.
bdict_data_ = bdict_data;
« no previous file with comments | « third_party/hunspell/google/bdict.cc ('k') | third_party/hunspell/google/bdict_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698