Bug 855822 - Remove Add/RemoveLibraryMappingForChild. r=ted

This commit is contained in:
Mike Hommey 2013-03-30 10:32:10 +01:00
Родитель d5328a7f1d
Коммит dee5b120df
6 изменённых файлов: 0 добавлений и 83 удалений

Просмотреть файл

@ -308,21 +308,6 @@ ContentChild::Init(MessageLoop* aIOLoop,
#ifdef MOZ_CRASHREPORTER
SendPCrashReporterConstructor(CrashReporter::CurrentThreadId(),
XRE_GetProcessType());
#if defined(MOZ_WIDGET_ANDROID)
PCrashReporterChild* crashreporter = ManagedPCrashReporterChild()[0];
InfallibleTArray<Mapping> mappings;
const struct mapping_info *info = getLibraryMapping();
while (info && info->name) {
mappings.AppendElement(Mapping(nsDependentCString(info->name),
nsDependentCString(info->file_id),
info->base,
info->len,
info->offset));
info++;
}
crashreporter->SendAddLibraryMappings(mappings);
#endif
#endif
SendGetProcessAttributes(&mID, &mIsForApp, &mIsForBrowser);

Просмотреть файл

@ -14,31 +14,6 @@ using namespace base;
namespace mozilla {
namespace dom {
void
CrashReporterParent::ActorDestroy(ActorDestroyReason why)
{
#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_CRASHREPORTER)
CrashReporter::RemoveLibraryMappingsForChild(ProcessId(OtherProcess()));
#endif
}
bool
CrashReporterParent::RecvAddLibraryMappings(const InfallibleTArray<Mapping>& mappings)
{
#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_CRASHREPORTER)
for (uint32_t i = 0; i < mappings.Length(); i++) {
const Mapping& m = mappings[i];
CrashReporter::AddLibraryMappingForChild(ProcessId(OtherProcess()),
m.library_name().get(),
m.file_id().get(),
m.start_address(),
m.mapping_length(),
m.file_offset());
}
#endif
return true;
}
void
CrashReporterParent::AnnotateCrashReport(const nsCString& key,
const nsCString& data)

Просмотреть файл

@ -73,10 +73,6 @@ public:
AnnotateCrashReport(const nsCString& key, const nsCString& data);
protected:
virtual void ActorDestroy(ActorDestroyReason why);
virtual bool
RecvAddLibraryMappings(const InfallibleTArray<Mapping>& m);
virtual bool
RecvAnnotateCrashReport(const nsCString& key, const nsCString& data) {
AnnotateCrashReport(key, data);

Просмотреть файл

@ -21,7 +21,6 @@ struct Mapping {
protocol PCrashReporter {
manager PContent or PPluginModule;
parent:
AddLibraryMappings(Mapping[] m);
AnnotateCrashReport(nsCString key, nsCString data);
AppendAppNotes(nsCString data);
__delete__();

Просмотреть файл

@ -354,7 +354,6 @@ typedef struct {
} mapping_info;
static std::vector<mapping_info> library_mappings;
typedef std::map<uint32_t,google_breakpad::MappingList> MappingMap;
static MappingMap child_library_mappings;
void FileIDToGUID(const char* file_id, u_int8_t guid[sizeof(MDGUID)])
{
@ -2849,36 +2848,6 @@ void AddLibraryMapping(const char* library_name,
file_offset);
}
}
void AddLibraryMappingForChild(uint32_t childPid,
const char* library_name,
const char* file_id,
uintptr_t start_address,
size_t mapping_length,
size_t file_offset)
{
if (child_library_mappings.find(childPid) == child_library_mappings.end())
child_library_mappings[childPid] = google_breakpad::MappingList();
google_breakpad::MappingInfo info;
info.start_addr = start_address;
info.size = mapping_length;
info.offset = file_offset;
strcpy(info.name, library_name);
struct google_breakpad::MappingEntry mapping;
mapping.first = info;
u_int8_t guid[sizeof(MDGUID)];
FileIDToGUID(file_id, guid);
memcpy(mapping.second, guid, sizeof(MDGUID));
child_library_mappings[childPid].push_back(mapping);
}
void RemoveLibraryMappingsForChild(uint32_t childPid)
{
MappingMap::iterator iter = child_library_mappings.find(childPid);
if (iter != child_library_mappings.end())
child_library_mappings.erase(iter);
}
#endif
} // namespace CrashReporter

Просмотреть файл

@ -191,13 +191,6 @@ void AddLibraryMapping(const char* library_name,
size_t mapping_length,
size_t file_offset);
void AddLibraryMappingForChild(uint32_t childPid,
const char* library_name,
const char* file_id,
uintptr_t start_address,
size_t mapping_length,
size_t file_offset);
void RemoveLibraryMappingsForChild(uint32_t childPid);
#endif
}