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

Issue 386014: The ChromeFrameAutomationClient class needs to be refcounted as it implements... (Closed)

Created:
11 years, 1 month ago by ananta
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, Paweł Hajdan Jr.
Visibility:
Public.

Description

The ChromeFrameAutomationClient class needs to be refcounted as it implements the PluginRequestHandler interface which is maintained by individual requests which can outlive the active document/activex instances. I ran into a crash where UrlmonUrlRequest was calling into an invalid PluginRequestHandler pointer which had been destroyed just before. We also need to ensure that UrlmonUrlRequest and ChromeFrameActiveXBase select the multi threaded model as AddRef/Release can be invoked from multiple threads. I also removed the CleanupAsyncRequests function in ChromeFrameAutomationClient and moved all the code to CleanupRequests, which ensures that we treat synchronous and asynchronous requests similarly. There are instances where an automation client instance is created and destroyed without being initialized which causes a spurious assert to fire in the Uninitialize function. I added a check in the Uninitialize function to return if the state is uninitialized. Bug=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31792

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 4

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -78 lines) Patch
M chrome_frame/chrome_active_document.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/chrome_frame_activex_base.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome_frame/chrome_frame_automation.h View 2 chunks +0 lines, -10 lines 0 comments Download
M chrome_frame/chrome_frame_automation.cc View 1 2 3 4 5 5 chunks +8 lines, -18 lines 0 comments Download
M chrome_frame/chrome_frame_plugin.h View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M chrome_frame/find_dialog.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/find_dialog.cc View 1 2 chunks +21 lines, -21 lines 0 comments Download
M chrome_frame/np_proxy_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/plugin_url_request.h View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome_frame/test/chrome_frame_automation_mock.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome_frame/test/chrome_frame_unittests.cc View 1 2 3 4 5 11 chunks +17 lines, -16 lines 0 comments Download
M chrome_frame/urlmon_url_request.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
ananta
11 years, 1 month ago (2009-11-12 02:48:24 UTC) #1
tommi (sloooow) - chröme
lgtm http://codereview.chromium.org/386014/diff/3030/2023 File chrome_frame/chrome_frame_automation.cc (right): http://codereview.chromium.org/386014/diff/3030/2023#newcode479 Line 479: return; DLOG(WARNING)? http://codereview.chromium.org/386014/diff/3030/2029 File chrome_frame/test/chrome_frame_unittests.cc (right): http://codereview.chromium.org/386014/diff/3030/2029#newcode1161 ...
11 years, 1 month ago (2009-11-12 16:21:33 UTC) #2
ananta
http://codereview.chromium.org/386014/diff/3030/2023 File chrome_frame/chrome_frame_automation.cc (right): http://codereview.chromium.org/386014/diff/3030/2023#newcode479 Line 479: return; On 2009/11/12 16:21:33, tommi wrote: > DLOG(WARNING)? ...
11 years, 1 month ago (2009-11-12 17:30:16 UTC) #3
amit
11 years, 1 month ago (2009-11-12 17:44:07 UTC) #4
The change LGTM and thanks for discovering the corner case and a quick fix.

However, things have become quite complicated because of a separate thread for
urlmon requests. It's going to hard to write good tests for this state machine.
It's also very hard to catch regressions. Let's talk about it.

Powered by Google App Engine
This is Rietveld 408576698