summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:48:31 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:48:31 +0000
commitec3402723404a98b0a152a3096a526167a7718a1 (patch)
tree5fdd9e7477cd80d7f6fb73de46c96e816028c7b8 /build
parent4aaa73ba1018d7af0ab5c5e54c72459c69e0226d (diff)
downloadchromium_src-ec3402723404a98b0a152a3096a526167a7718a1.zip
chromium_src-ec3402723404a98b0a152a3096a526167a7718a1.tar.gz
chromium_src-ec3402723404a98b0a152a3096a526167a7718a1.tar.bz2
Revert changes that moved spellchecker to renderer for 249 branch since there were some crashes and pulling in the fixes is hard.
This reverts: ------------------------------------------------------------------------ r31875 | estade@chromium.org | 2009-11-12 17:36:50 -0800 (Thu, 12 Nov 2009) | 4 lines Use renderer spellchecker for windows. BUG=25677 Review URL: http://codereview.chromium.org/372075 ------------------------------------------------------------------------ r31529 | estade@chromium.org | 2009-11-09 17:33:05 -0800 (Mon, 09 Nov 2009) | 8 lines Couple of prospective fix for memory test flakiness: addref/release the url request context getter appropriately; fix a leak. Passing as a straight pointer without addreffing was copied from the previous spellchecker impl. Using .release() instead of = NULL was a plain old mistake. BUG=none TEST=memory test flakiness goes away hopefully? Review URL: http://codereview.chromium.org/379015 ------------------------------------------------------------------------ r31199 | estade@chromium.org | 2009-11-05 19:05:46 -0800 (Thu, 05 Nov 2009) | 28 lines Move the spellchecker to the renderer. The motivation is that this removes the sync IPC on every call to the spellchecker. Also, currently we spellcheck in the IO thread, which frequently needs to go to disk (in particular, the entire spellcheck dictionary starts paged out), so this will block just the single renderer when that happens, rather than the whole IO thread. This breaks the SpellChecker class into two new classes. 1) On the browser side, we have SpellCheckHost. This class handles browser-wide tasks, such as keeping the custom words list in sync with the on-disk custom words dictionary, downloading missing dictionaries, etc. On Posix, it also opens the bdic file since the renderer isn't allowed to open files. SpellCheckHost is created and destroyed on the UI thread. It is initialized on the file thread. 2) On the renderer side, SpellChecker2. This class will one day be renamed SpellChecker. It handles actual checking of the words, memory maps the dictionary file, loads hunspell, etc. There is one SpellChecker2 per RenderThread (hence one per render process). My intention is for this patch to move Linux to this new approach, and follow up with ports for Windows (which will involve passing a dictionary file name rather than a file descriptor through to the renderer) and Mac (which will involve adding sync ViewHost IPC callsfor when the platform spellchecker is enabled). Note that anyone using the platform spellchecker rather than Hunspell will get no benefit out of this refactor. There should be no loss of functionality for Linux (or any other platform) in this patch. The following should all still work: - dictionary is loaded lazily - hunspell is initialized lazily, per renderer - language changes work. - Dynamic downloading of new dictionaries - auto spell correct works (as well as toggling it). - disabling spellcheck works. - custom words work (including adding in one renderer and immediately having it take effect in other renderers, for certain values of "immediate") TODO: - move spellchecker unit tests to test SpellCheck2 - add sync IPC for platform spellchecker; port to Mac - add dictionary location fallback; port to Windows - remove SpellChecker classes from browser/ BUG=25677 Review URL: http://codereview.chromium.org/357003 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi13
1 files changed, 1 insertions, 12 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 4652db4..be89cdd 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -43,17 +43,10 @@
# else gets passed through, which probably won't work very well; such
# hosts should pass an explicit target_arch to gyp.
'target_arch%':
- '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/arm.*/arm/")',
-
+ '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/arm.*/arm/")'
}, { # OS!="linux"
'target_arch%': 'ia32',
}],
- [ 'OS=="mac"', {
- # For now, only Linux and Windows use spellcheck in the renderer.
- 'spellchecker_in_renderer%': 0,
- }, { # OS!="mac"
- 'spellchecker_in_renderer%': 1,
- }],
],
# We do want to build Chromium with Breakpad support in certain
@@ -86,7 +79,6 @@
'branding%': '<(branding)',
'buildtype%': '<(buildtype)',
'target_arch%': '<(target_arch)',
- 'spellchecker_in_renderer%': '<(spellchecker_in_renderer)',
'toolkit_views%': '<(toolkit_views)',
'chromeos%': '<(chromeos)',
'inside_chromium_build%': '<(inside_chromium_build)',
@@ -309,9 +301,6 @@
['enable_pepper==1', {
'defines': ['ENABLE_PEPPER=1'],
}],
- ['spellchecker_in_renderer==1', {
- 'defines': ['SPELLCHECKER_IN_RENDERER=1']
- }],
['fastbuild!=0', {
'conditions': [
# Finally, for Windows, we simply turn on profiling.