зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1633650: mscom::Interceptor: Don't call HandlerProvider::GetPayloadSize for external process callers. r=aklotz
When an Interceptor is marshaled for an external (non-chrome) process caller, we do not provide a handler and thus don't call HandlerProvider::WriteHandlerPayload. However, GetMarshalSizeMax previously called HandlerProvider::GetPayloadSize even for external process callers. For a11y's handlerProvider, we must build the payload to get the size. This is wasteful in this case, since we're just going to throw it away. Differential Revision: https://phabricator.services.mozilla.com/D72796
This commit is contained in:
Родитель
350170619f
Коммит
c697d1edde
|
@ -302,6 +302,15 @@ Interceptor::GetMarshalSizeMax(REFIID riid, void* pv, DWORD dwDestContext,
|
|||
return hr;
|
||||
}
|
||||
|
||||
#if defined(MOZ_MSCOM_REMARSHAL_NO_HANDLER)
|
||||
if (XRE_IsContentProcess() && IsCallerExternalProcess()) {
|
||||
// The caller isn't our chrome process, so we do not provide a handler
|
||||
// payload. Even though we're only getting the size here, calculating the
|
||||
// payload size might actually require building the payload.
|
||||
return hr;
|
||||
}
|
||||
#endif // defined(MOZ_MSCOM_REMARSHAL_NO_HANDLER)
|
||||
|
||||
DWORD payloadSize = 0;
|
||||
hr = mEventSink->GetHandlerPayloadSize(WrapNotNull(this),
|
||||
WrapNotNull(&payloadSize));
|
||||
|
|
Загрузка…
Ссылка в новой задаче