Bug 1570089 Part 3 - Generate replaying process crash reports when requested by the middleman, r=mccr8.

Depends on D39926

Differential Revision: https://phabricator.services.mozilla.com/D39927

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Hackett 2019-08-04 16:50:37 +00:00
parent 793df565cd
commit b24faa1675
3 changed files with 22 additions and 0 deletions

View File

@ -1896,6 +1896,25 @@ mozilla::ipc::IPCResult ContentParent::RecvCreateReplayingProcess(
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvGenerateReplayCrashReport(
const uint32_t& aChannelId) {
if (aChannelId >= mReplayingChildren.length()) {
return IPC_FAIL(this, "invalid channel ID");
}
GeckoChildProcessHost* child = mReplayingChildren[aChannelId];
if (!child) {
return IPC_FAIL(this, "invalid channel ID");
}
if (mCrashReporter) {
ProcessId pid = base::GetProcId(child->GetChildProcessHandle());
mCrashReporter->GenerateCrashReport(pid);
}
return IPC_OK();
}
jsipc::CPOWManager* ContentParent::GetCPOWManager() {
if (PJavaScriptParent* p =
LoneManagedOrNullAsserts(ManagedPJavaScriptParent())) {

View File

@ -303,6 +303,8 @@ class ContentParent final : public PContentParent,
const uint32_t& channelId, FileDescriptor* connection);
mozilla::ipc::IPCResult RecvCreateReplayingProcess(
const uint32_t& aChannelId);
mozilla::ipc::IPCResult RecvGenerateReplayCrashReport(
const uint32_t& aChannelId);
mozilla::ipc::IPCResult RecvCreateGMPService();

View File

@ -817,6 +817,7 @@ parent:
sync OpenRecordReplayChannel(uint32_t channelId)
returns (FileDescriptor connection);
async CreateReplayingProcess(uint32_t channelId);
async GenerateReplayCrashReport(uint32_t channelId);
async CreateGMPService();