From 4d96e4e504ef04b6acd2e03a92397c41df606352 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Wed, 21 Feb 2018 09:54:41 -0800 Subject: [PATCH] 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 Commit-Queue: Scott Graham --- snapshot/fuchsia/process_snapshot_fuchsia.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/snapshot/fuchsia/process_snapshot_fuchsia.cc b/snapshot/fuchsia/process_snapshot_fuchsia.cc index e0070eac..ce8b0ea8 100644 --- a/snapshot/fuchsia/process_snapshot_fuchsia.cc +++ b/snapshot/fuchsia/process_snapshot_fuchsia.cc @@ -131,14 +131,17 @@ std::vector ProcessSnapshotFuchsia::Threads() const { std::vector ProcessSnapshotFuchsia::Modules() const { INITIALIZATION_STATE_DCHECK_VALID(initialized_); - NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196 - return std::vector(); + std::vector modules; + for (const auto& module : modules_) { + modules.push_back(module.get()); + } + return modules; } std::vector 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(); }