diff options
author | Ben Murdoch <benm@google.com> | 2010-12-17 17:51:56 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-12-20 11:24:16 +0000 |
commit | 40eae52c5e5dbf475a0cf368c9ccbb7f8a0653f4 (patch) | |
tree | f3f1c1dd8eabbbc30b03157fee5c7e23865e5147 /chrome/common | |
parent | 6549a5990c7b8672bd9d216ffb55d8a7a5999cc2 (diff) | |
download | external_chromium-40eae52c5e5dbf475a0cf368c9ccbb7f8a0653f4.zip external_chromium-40eae52c5e5dbf475a0cf368c9ccbb7f8a0653f4.tar.gz external_chromium-40eae52c5e5dbf475a0cf368c9ccbb7f8a0653f4.tar.bz2 |
Fix crash in AutoFill
We recently changed WebKit to use one URLRequestContext per WebView.
However AutoFill did not get migrated to the new system and so
we have observed crashes due to a dangling pointer. We have one
AutoFill object per WebView and hence one Profile object per webview.
we access the URLRequestContext through the Profile so inject the
correct context in when the AutoFill object is created.
Needs a change in external/webkit, see
Iace23ae8c0240f0134894c12d2f7281161aa6150
Bug: 3291654
Change-Id: I004ab7ac9c6a72be1b62aa8e44322b97a371c136
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/net/url_fetcher.cc | 6 | ||||
-rw-r--r-- | chrome/common/net/url_fetcher.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/common/net/url_fetcher.cc b/chrome/common/net/url_fetcher.cc index 9551255..e7fcbd2 100644 --- a/chrome/common/net/url_fetcher.cc +++ b/chrome/common/net/url_fetcher.cc @@ -419,6 +419,12 @@ void URLFetcher::set_request_context( core_->request_context_getter_ = request_context_getter; } +#ifdef ANDROID +URLRequestContextGetter* URLFetcher::request_context() { + return core_->request_context_getter_; +} +#endif + void URLFetcher::set_automatically_retry_on_5xx(bool retry) { automatically_retry_on_5xx_ = retry; } diff --git a/chrome/common/net/url_fetcher.h b/chrome/common/net/url_fetcher.h index b998df6..8566d42 100644 --- a/chrome/common/net/url_fetcher.h +++ b/chrome/common/net/url_fetcher.h @@ -155,6 +155,10 @@ class URLFetcher { void set_request_context( URLRequestContextGetter* request_context_getter); +#ifdef ANDROID + URLRequestContextGetter* request_context(); +#endif + // If |retry| is false, 5xx responses will be propagated to the observer, // if it is true URLFetcher will automatically re-execute the request, // after backoff_delay() elapses. URLFetcher has it set to true by default. |