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

Issue 10532099: Switching to IDispatch::Invoke when calling Omaha interfaces. (Closed)

Created:
8 years, 6 months ago by alexeypa (please no reviews)
Modified:
8 years, 6 months ago
Reviewers:
Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

[Chromoting] Using IDispatch::Invoke() to call Omaha inetrfaces. Omaha uses non-standard scheme for versioning its COM interfaces. Instead of letting the callers to know a fixed UUID and prototype of an interface, Omaha relies on the callers to use late binding via IDispatch::Invoke. This way it can extend an interface after it has been released by adding new members and changing its UUID. The limitation is that vtable can no longer be used. BUG=131498 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141960

Patch Set 1 #

Total comments: 25

Patch Set 2 : CR feedback. #

Total comments: 19

Patch Set 3 : More CR feedback. #

Patch Set 4 : rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+772 lines, -44 lines) Patch
A remoting/base/dispatch_win.h View 1 2 1 chunk +536 lines, -0 lines 0 comments Download
A remoting/base/dispatch_win.h.pump View 1 2 1 chunk +180 lines, -0 lines 0 comments Download
M remoting/host/plugin/daemon_installer_win.cc View 11 chunks +55 lines, -44 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
alexeypa (please no reviews)
PTAL.
8 years, 6 months ago (2012-06-12 00:03:16 UTC) #1
alexeypa (please no reviews)
On 2012/06/12 00:03:16, alexeypa wrote: > PTAL. Ping!
8 years, 6 months ago (2012-06-12 23:30:55 UTC) #2
Wez
Mostly looks good, but the CL description needs a summary of why we want to ...
8 years, 6 months ago (2012-06-13 00:34:36 UTC) #3
alexeypa (please no reviews)
FYI. https://chromiumcodereview.appspot.com/10532099/diff/1/remoting/base/dispatch_win.h.pump File remoting/base/dispatch_win.h.pump (right): https://chromiumcodereview.appspot.com/10532099/diff/1/remoting/base/dispatch_win.h.pump#newcode8 remoting/base/dispatch_win.h.pump:8: $$ It is choosend to match the number ...
8 years, 6 months ago (2012-06-13 16:39:47 UTC) #4
Wez
LGTM w/ a couple of typos & nits, but the CL still needs a proper ...
8 years, 6 months ago (2012-06-13 17:55:15 UTC) #5
alexeypa (please no reviews)
FYI https://chromiumcodereview.appspot.com/10532099/diff/1/remoting/base/dispatch_win.h.pump File remoting/base/dispatch_win.h.pump (right): https://chromiumcodereview.appspot.com/10532099/diff/1/remoting/base/dispatch_win.h.pump#newcode40 remoting/base/dispatch_win.h.pump:40: class ScopedVariantArg : public VARIANTARG { VARIANT and ...
8 years, 6 months ago (2012-06-13 18:45:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexeypa@chromium.org/10532099/1010
8 years, 6 months ago (2012-06-13 18:46:58 UTC) #7
commit-bot: I haz the power
Change committed as 141960
8 years, 6 months ago (2012-06-13 20:45:26 UTC) #8
Wez
https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispatch_win.h File remoting/base/dispatch_win.h (right): https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispatch_win.h#newcode29 remoting/base/dispatch_win.h:29: // the caller to free leakable variants (such as ...
8 years, 6 months ago (2012-06-13 21:02:16 UTC) #9
alexeypa (please no reviews)
8 years, 6 months ago (2012-06-14 16:27:19 UTC) #10
FYI

https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispa...
File remoting/base/dispatch_win.h (right):

https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispa...
remoting/base/dispatch_win.h:29: //         the caller to free leakable variants
(such as VT_DISPATCH).
On 2012/06/13 21:02:16, Wez wrote:
> In which case it's important that the supplied VARIANTARG not have been
> initialized with leakable content, otherwise it will be leaked; that should be
> clarified in the comments.

The same rule applies to any other C++ function taking out parameters as
pointers. I'll add a note to the comments.

https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispa...
remoting/base/dispatch_win.h:36: // provides marshaling methods that convert
between C++ types and VARIANTs.
On 2012/06/13 21:02:16, Wez wrote:
> OK; consider adding a line to clarify that currently only the ScopedVariant
> wrapper C++ class is supported.

Will do.

https://chromiumcodereview.appspot.com/10532099/diff/8002/remoting/base/dispa...
remoting/base/dispatch_win.h:56: HRESULT Marshal(const VARIANT& param) {
On 2012/06/13 21:02:16, Wez wrote:
> CopyFrom() describes the actual action that the call performs, though.  Wrap
> doesn't - you don't wrap in-parameters, you create a copy to pass to the API.

I still think CopyFrom() is one level too verbose than needed. The actions
performed is "prepare the parameter for passing to API" and "pass the parameter
back ro the original caller". The fact that we copy it is just an implementation
detail.

> Actually, why do you need to take a copy, rather than passing the
caller-managed
> VARIANT in directly? Isn't VARIANT resource management only required for
> out-params, really?

When it is time to clean up I don't know if the parameter is [in] or [out]. It
has to be cleaned in either case.

Powered by Google App Engine
This is Rietveld 408576698