Closed Bug 1411439 Opened 7 years ago Closed 7 years ago

Pass interceptor to IHandlerProvider

Categories

(Core :: IPC: MSCOM, enhancement)

Unspecified
Windows
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

(Whiteboard: aes+)

Attachments

(1 file, 1 obsolete file)

      No description provided.
Whoops, forgot description:

In some cases IHandlerProvider implementers may want to access the interceptor that owns the handler provider. We should pass a weakref into the handler provider to enable such access.
Based on discussions with Jamie, we think that the right place to pass this parameter is during payload construction, so the weakref should be added to GetHandlerPayloadSize and WriteHandlerPayload.
Whiteboard: aes+
Comment on attachment 8922518 [details] [diff] [review]
Pass WeakRefs into HandlerProvider at payload generation time

Thanks! This will work, but as discussed on IRC, unless there's a good reason not to do this, it'd be simpler to just pass the interceptor itself (since the call chain starts at the interceptor anyway) rather than a weak ref. We don't even need to resolve the weak ref because the interceptor can just pass itself. A weak ref made more sense when we were talking about passing it into CreateInstance, but the passed reference shouldn't outlive the payload methods, so I think the simpler path is better in this case.
Summary: Pass interceptor weakref to IHandlerProvider → Pass interceptor to IHandlerProvider
Comment on attachment 8922552 [details] [diff] [review]
Pass Interceptor pointer into HandlerProvider at payload generation time

Nice! Ta!
Attachment #8922552 - Flags: review?(jteh) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6be650fc1783f3c64642d137ae7d53052ff3b8f
Bug 1411439: Pass reference to owning interceptor into HandlerProvider for payload creation; r=Jamie
https://hg.mozilla.org/mozilla-central/rev/e6be650fc178
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: