зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675828 - Call OtherPidMaybeInvalid for the IPC marker because this code can run at times when the other pid is not known. r=jld
This avoids a crash from the MOZ_RELEASE_ASSERT in OtherPid() on Android. Differential Revision: https://phabricator.services.mozilla.com/D96262
This commit is contained in:
Родитель
efb7041524
Коммит
81ba35b3f7
|
@ -2787,11 +2787,14 @@ void MessageChannel::AddProfilerMarker(const IPC::Message& aMessage,
|
|||
mMonitor->AssertCurrentThreadOwns();
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
if (profiler_feature_active(ProfilerFeature::IPCMessages)) {
|
||||
int32_t pid = mListener->OtherPid();
|
||||
int32_t pid = mListener->OtherPidMaybeInvalid();
|
||||
if (pid != kInvalidProcessId) {
|
||||
PROFILER_ADD_MARKER_WITH_PAYLOAD(
|
||||
"IPC", IPC, IPCMarkerPayload,
|
||||
(pid, aMessage.seqno(), aMessage.type(), mSide, aDirection,
|
||||
MessagePhase::Endpoint, aMessage.is_sync(), TimeStamp::NowUnfuzzed()));
|
||||
MessagePhase::Endpoint, aMessage.is_sync(),
|
||||
TimeStamp::NowUnfuzzed()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -513,9 +513,9 @@ class IToplevelProtocol : public IProtocol {
|
|||
already_AddRefed<nsISerialEventTarget> GetMessageEventTarget(
|
||||
const Message& aMsg);
|
||||
|
||||
private:
|
||||
base::ProcessId OtherPidMaybeInvalid() const { return mOtherPid; }
|
||||
|
||||
private:
|
||||
int32_t NextId();
|
||||
|
||||
template <class T>
|
||||
|
|
Загрузка…
Ссылка в новой задаче