Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 4937147073167360: Issue 1672 - Subscribe and listen COM events using ATL::IDispEventImpl and BEGIN_SINK_MAP (Closed)

Created:
Dec. 8, 2014, 12:19 p.m. by sergei
Modified:
March 30, 2015, 7:24 a.m.
Reviewers:
Eric, Oleksandr
Visibility:
Public.

Description

# Wait for resolution reagarding http://codereview.adblockplus.org/6032593782833152/ - fix call of CPluginTabBase::OnDocumentComplete from OnDocumentComplete to pass the browser of the current frame, not the browser of the root page - remove interface IIEPlugin from idl file because we don't need it - remove CPluginClass::Invoke - add SINK_MAP to CPluginClass - remove CPluginClass::GetConnectionPoint because now we use ATL::IDispEventImpl::{DispEventAdvise,DispEventUnadvise} which do it. - remove CPluginClass::m_nConnectionID because now it lives in ATL::IDispEventImpl - extract the code from CPluginClass::Invoke into new methods - change to calling convention and adjust arguments of methods which are slots for the events to stdcall because it's required by ATL::IDispEventImpl - add more argument checks for all new and modified methods

Patch Set 1 #

Total comments: 8

Patch Set 2 : fix-NITs #

Total comments: 19

Patch Set 3 : fix accoring to comments without entry point #

Total comments: 2

Patch Set 4 : add exception wrappers #

Total comments: 4

Patch Set 5 : rebase, parent = 5d5eb4df1bf2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1936 lines, -2066 lines) Patch
M src/plugin/AdblockPlus.idl View 1 2 3 4 2 chunks +1 line, -13 lines 0 comments Download
M src/plugin/PluginClass.h View 1 2 3 4 1 chunk +184 lines, -174 lines 0 comments Download
M src/plugin/PluginClass.cpp View 1 2 3 4 1 chunk +1750 lines, -1878 lines 0 comments Download
M src/plugin/PluginErrorCodes.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22
Eric
If I understand our requirements correctly, we need to be able to run under the ...
Dec. 31, 2014, 5:03 p.m. (2014-12-31 17:03:15 UTC) #1
Oleksandr
Looks great, with just a few nits. Looks like there will be some merge conflicts ...
Jan. 9, 2015, 12:02 a.m. (2015-01-09 00:02:16 UTC) #2
sergei
rebased and fixed http://codereview.adblockplus.org/4937147073167360/diff/5629499534213120/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5629499534213120/src/plugin/PluginClass.cpp#newcode249 src/plugin/PluginClass.cpp:249: m_isAdviced = true; On 2015/01/09 00:02:17, ...
Jan. 9, 2015, 4:10 p.m. (2015-01-09 16:10:30 UTC) #3
Oleksandr
http://codereview.adblockplus.org/4937147073167360/diff/5766466041282560/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5766466041282560/src/plugin/PluginClass.cpp#newcode309 src/plugin/PluginClass.cpp:309: // Unadvise I guess we can loose the captain ...
Jan. 10, 2015, 11:27 p.m. (2015-01-10 23:27:24 UTC) #4
Eric
See #1173 about the need to deal with entry points correctly. https://issues.adblockplus.org/ticket/1173 http://codereview.adblockplus.org/4937147073167360/diff/5766466041282560/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp ...
Jan. 12, 2015, 2:18 p.m. (2015-01-12 14:18:07 UTC) #5
sergei
I've not addressed try-catch and entry points here, because I've created a proposal how it ...
Jan. 13, 2015, 11:49 a.m. (2015-01-13 11:49:12 UTC) #6
Eric
On 2015/01/13 11:49:12, sergei wrote: > I've not addressed try-catch and entry points here, because ...
Jan. 13, 2015, 5:43 p.m. (2015-01-13 17:43:45 UTC) #7
Eric
http://codereview.adblockplus.org/4937147073167360/diff/5766466041282560/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5766466041282560/src/plugin/PluginClass.cpp#newcode246 src/plugin/PluginClass.cpp:246: HRESULT hr = DispEventAdvise(webBrowser); On 2015/01/13 11:49:12, sergei wrote: ...
Jan. 13, 2015, 6:44 p.m. (2015-01-13 18:44:30 UTC) #8
sergei
I've added try-catch. Regarding details of advising and unadvising, in general, it's not a part ...
Feb. 27, 2015, 6:27 p.m. (2015-02-27 18:27:36 UTC) #9
Eric
On 2015/02/27 18:27:36, sergei wrote: > - m_isAdvised is > -- modified and DispEventAdvise is ...
Feb. 28, 2015, 7:18 p.m. (2015-02-28 19:18:22 UTC) #10
Eric
Editing problem. Here's the complete sentence: > (There's even a comment that we should wait ...
Feb. 28, 2015, 7:20 p.m. (2015-02-28 19:20:33 UTC) #11
sergei
On 2015/02/28 19:18:22, Eric wrote: > On 2015/02/27 18:27:36, sergei wrote: > > - m_isAdvised ...
March 9, 2015, 10:33 a.m. (2015-03-09 10:33:26 UTC) #12
Eric
On 2015/03/09 10:33:26, sergei wrote: > SetSite is only one entry point, how can there ...
March 9, 2015, 1:40 p.m. (2015-03-09 13:40:41 UTC) #13
Oleksandr
> The apparent behavior is that (IE-internal) browser objects instantiate a single > BHO object ...
March 10, 2015, 8:05 a.m. (2015-03-10 08:05:36 UTC) #14
Oleksandr
LGTM
March 12, 2015, 4:47 a.m. (2015-03-12 04:47:44 UTC) #15
Oleksandr
http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp#newcode491 src/plugin/PluginClass.cpp:491: /* [in] */ IDispatch* frameBrowserDisp, Since we do have ...
March 12, 2015, 5:10 a.m. (2015-03-12 05:10:57 UTC) #16
Eric
Noticed something else. Not a blocker to commit. http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (left): http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp#oldcode630 src/plugin/PluginClass.cpp:630: DEBUG_GENERAL(tmp); ...
March 12, 2015, 10:43 p.m. (2015-03-12 22:43:14 UTC) #17
sergei
Please take a look at it again, because I've rebased it.
March 13, 2015, 3:45 p.m. (2015-03-13 15:45:31 UTC) #18
Eric
Patch set 5 LGTM
March 13, 2015, 4:18 p.m. (2015-03-13 16:18:26 UTC) #19
Oleksandr
http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp#newcode491 src/plugin/PluginClass.cpp:491: /* [in] */ IDispatch* frameBrowserDisp, On 2015/03/12 05:10:57, Oleksandr ...
March 13, 2015, 4:42 p.m. (2015-03-13 16:42:03 UTC) #20
sergei
http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): http://codereview.adblockplus.org/4937147073167360/diff/5631943370604544/src/plugin/PluginClass.cpp#newcode491 src/plugin/PluginClass.cpp:491: /* [in] */ IDispatch* frameBrowserDisp, On 2015/03/13 16:42:03, Oleksandr ...
March 13, 2015, 5:03 p.m. (2015-03-13 17:03:14 UTC) #21
Oleksandr
March 17, 2015, 2:44 a.m. (2015-03-17 02:44:52 UTC) #22

Powered by Google App Engine
This is Rietveld