fuchsia: Return ModuleSnapshot* out of ProcessSnapshotFuchsia

And document that UnloadedModules() isn't applicable on Fuchsia.

Bug: crashpad:196
Change-Id: Ic2c5f26fbc9cbd908ec0b941797c63f88caeec9c
Reviewed-on: https://chromium-review.googlesource.com/929302
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2018-02-21 09:54:41 -08:00 committed by Commit Bot
parent 1aae5cedaf
commit 4d96e4e504

View File

@ -131,14 +131,17 @@ std::vector<const ThreadSnapshot*> ProcessSnapshotFuchsia::Threads() const {
std::vector<const ModuleSnapshot*> ProcessSnapshotFuchsia::Modules() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196
return std::vector<const ModuleSnapshot*>();
std::vector<const ModuleSnapshot*> modules;
for (const auto& module : modules_) {
modules.push_back(module.get());
}
return modules;
}
std::vector<UnloadedModuleSnapshot> ProcessSnapshotFuchsia::UnloadedModules()
const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196
// dlclose() never unloads on Fuchsia. ZX-1728 upstream.
return std::vector<UnloadedModuleSnapshot>();
}