diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 21:30:07 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 21:30:07 +0000 |
commit | f41301e22f97b5117f8b6ada563d7916b01fe56c (patch) | |
tree | 5fb1ecea7b16d71c740a44651b8588b500b9ad77 /chrome/browser/spellcheck_host.h | |
parent | 92b004f5485530d81daab60b5b02207507d1a2bd (diff) | |
download | chromium_src-f41301e22f97b5117f8b6ada563d7916b01fe56c.zip chromium_src-f41301e22f97b5117f8b6ada563d7916b01fe56c.tar.gz chromium_src-f41301e22f97b5117f8b6ada563d7916b01fe56c.tar.bz2 |
Spellchecker: call init *after* constructor.
This fixes the error where PostTask would post the task to the file thread and release its reference before the constructor returned.
credit for fix goes to jam@ and thestig@
Review URL: http://codereview.chromium.org/399011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_host.h')
-rw-r--r-- | chrome/browser/spellcheck_host.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h index 8c2ef55..ac540f1 100644 --- a/chrome/browser/spellcheck_host.h +++ b/chrome/browser/spellcheck_host.h @@ -28,6 +28,8 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, const std::string& language, URLRequestContextGetter* request_context_getter); + void Initialize(); + // Clear |observer_|. Used to prevent calling back to a deleted object. void UnsetObserver(); @@ -52,7 +54,7 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, // Load and parse the custom words dictionary and open the bdic file. // Executed on the file thread. - void Initialize(); + void InitializeInternal(); // Inform |observer_| that initialization has finished. void InformObserverOfInitialization(); |