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

Issue 386008: ChromeFrame HTTP requests would randomly fail if we navigated to multiple HTT... (Closed)

Created:
11 years, 1 month ago by ananta
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, amit, ben+cc_chromium.org
Visibility:
Public.

Description

ChromeFrame HTTP requests would randomly fail if we navigated to multiple HTTP sites. This was because the automation resource message filter tracked HTTP requests based on the request ids which are generated by the renderer process. As a result a new request would get created say with id 0, while an existing request would end in ChromeFrame causing the new request to incorrectly shutdown. Fix is to revert back to the original way of tracking requests with an auto incrementing id. The automation url job maintains both ids now, i.e. the automation request id and the chrome request id. The download notification receives the automation id and basically looks up the associated automation request id and sends the notification back to ChromeFrame. This fixes bug http://code.google.com/p/chromium/issues/detail?id=27401 Other fixes in this CL include the following:- 1. The active document instance would never get destroyed. This was because we call ShowUI on the doc host which maintains a reference. We need to call HideUI in Setsite of NULL, which releases the reference. 2. When the active x instance is shutting down we try to shutdown all running requests in the OnDestroy handler. To ensure that the request is deleted from the request map and released in the same thread which created it we post a task back to the ui thread which never runs as the window is being destroyed. Fix is to create a message only window with every urlmonrequest instance which supports task marshaling. Tests in a future CL. Bug=27401 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31731

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 11

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -41 lines) Patch
M chrome/browser/automation/automation_resource_message_filter.h View 1 2 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/automation/automation_resource_message_filter.cc View 1 2 3 2 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/automation/url_request_automation_job.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/automation/url_request_automation_job.cc View 1 2 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/external_tab_container.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome_frame/chrome_active_document.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome_frame/chrome_active_document.cc View 1 2 3 2 chunks +10 lines, -8 lines 0 comments Download
M chrome_frame/chrome_frame_activex_base.h View 3 chunks +1 line, -7 lines 0 comments Download
M chrome_frame/urlmon_url_request.h View 5 chunks +12 lines, -6 lines 0 comments Download
M chrome_frame/urlmon_url_request.cc View 1 2 3 4 5 6 5 chunks +21 lines, -11 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
ananta
11 years, 1 month ago (2009-11-11 20:54:00 UTC) #1
Paweł Hajdan Jr.
Drive-by. http://codereview.chromium.org/386008/diff/1/9 File chrome/browser/automation/automation_resource_message_filter.cc (right): http://codereview.chromium.org/386008/diff/1/9#newcode223 Line 223: Send(new AutomationMsg_DownloadRequestInHost(0, tab_handle, If Send returns bool ...
11 years, 1 month ago (2009-11-11 21:03:27 UTC) #2
tommi (sloooow) - chröme
thanks for tracking this down Ananta http://codereview.chromium.org/386008/diff/5001/5009 File chrome/browser/automation/automation_resource_message_filter.cc (right): http://codereview.chromium.org/386008/diff/5001/5009#newcode200 Line 200: RequestMap::iterator it ...
11 years, 1 month ago (2009-11-11 21:12:58 UTC) #3
amit
LGTM! Awesome finds and fixes. http://codereview.chromium.org/386008/diff/5001/5004 File chrome_frame/chrome_active_document.cc (right): http://codereview.chromium.org/386008/diff/5001/5004#newcode143 Line 143: // Release the ...
11 years, 1 month ago (2009-11-11 21:14:34 UTC) #4
ananta
http://codereview.chromium.org/386008/diff/1/9 File chrome/browser/automation/automation_resource_message_filter.cc (right): http://codereview.chromium.org/386008/diff/1/9#newcode223 Line 223: Send(new AutomationMsg_DownloadRequestInHost(0, tab_handle, On 2009/11/11 21:03:27, Paweł Hajdan ...
11 years, 1 month ago (2009-11-11 21:21:00 UTC) #5
Paweł Hajdan Jr.
LGTM
11 years, 1 month ago (2009-11-11 21:25:49 UTC) #6
tommi (sloooow) - chröme
http://codereview.chromium.org/386008/diff/5001/5002 File chrome_frame/urlmon_url_request.cc (right): http://codereview.chromium.org/386008/diff/5001/5002#newcode115 Line 115: Release(); On 2009/11/11 21:21:01, ananta wrote: > On ...
11 years, 1 month ago (2009-11-11 22:09:50 UTC) #7
ananta
On 2009/11/11 22:09:50, tommi wrote: > http://codereview.chromium.org/386008/diff/5001/5002 > File chrome_frame/urlmon_url_request.cc (right): > > http://codereview.chromium.org/386008/diff/5001/5002#newcode115 > ...
11 years, 1 month ago (2009-11-11 22:23:06 UTC) #8
ananta
On 2009/11/11 22:23:06, ananta wrote: > On 2009/11/11 22:09:50, tommi wrote: > > http://codereview.chromium.org/386008/diff/5001/5002 > ...
11 years, 1 month ago (2009-11-11 22:23:52 UTC) #9
tommi (sloooow) - chröme
11 years, 1 month ago (2009-11-11 22:43:47 UTC) #10
cool. thanks.  lgtm

On Wed, Nov 11, 2009 at 5:23 PM, <ananta@chromium.org> wrote:

> On 2009/11/11 22:23:06, ananta wrote:
>
>> On 2009/11/11 22:09:50, tommi wrote:
>> > http://codereview.chromium.org/386008/diff/5001/5002
>> > File chrome_frame/urlmon_url_request.cc (right):
>> >
>> > http://codereview.chromium.org/386008/diff/5001/5002#newcode115
>> > Line 115: Release();
>> > On 2009/11/11 21:21:01, ananta wrote:
>> > > On 2009/11/11 21:12:58, tommi wrote:
>> > > > where's the matching AddRef?
>> > >
>> > > In UrlmonUrlRequest::Start
>> >
>> > I only see one AddRef in UrlmonUrlRequest::Start and that was there
>> before
>> this
>> > change with the note "This will be released in EndRequest"
>> >
>> > Is it possible that we were leaking before and not now?
>> > It feels like there's a mismatch somewhere.
>>
>
>  We were not leaking in theory before as well. Release was called in
>> EndRequestInternal which is the queued task. However there were instances
>>
> where
>
>> this task would not run like when the activex was destroyed. This CL fixes
>>
> that
>
>> by having every urlmonurlrequest instance have its own message window.
>>
>
> I also updated the comment in the urlmonurlrequest::start function
> indicating
> that the additional refcount is released in OnFinalMessage.
>
>
>
> http://codereview.chromium.org/386008
>

Powered by Google App Engine
This is Rietveld 408576698