Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(991)

Unified Diff: third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc

Issue 2754553002: Update Crashpad to 18d70acf81df49cc10b00bcc67c1ec64e16bd9d0 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
diff --git a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc b/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
index f4f53494a9a386519ed59d495392cedac82c248a..7a94eb2c2cfb324c0994e42dc372ea40be62e250 100644
--- a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
+++ b/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
@@ -117,14 +117,14 @@ class TestMachOImageAnnotationsReader final
bool* destroy_complex_request) override {
*destroy_complex_request = true;
- // In 10.12, dyld fatal errors as tested by test_type_ = kCrashDyld are via
- // abort_with_payload(). In 10.12.1, the task port delivered in an exception
- // message for this termination type is a corpse, even when the exception is
- // EXC_CRASH and not EXC_CORPSE_NOTIFY. The corpse task port (here, |task|)
- // is distinct from the process’ original task port (ChildTask()). This is
- // filed as https://openradar.appspot.com/29079442.
- //
- // Instead of comparing task ports, compare PIDs.
+ if (test_type_ != kCrashDyld) {
+ // In 10.12.1 and later, the task port will not match ChildTask() in the
+ // kCrashDyld case, because kCrashDyld uses execl(), which results in a
+ // new task port being assigned.
+ EXPECT_EQ(ChildTask(), task);
+ }
+
+ // The process ID should always compare favorably.
pid_t task_pid;
kern_return_t kr = pid_for_task(task, &task_pid);
EXPECT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "pid_for_task");
« no previous file with comments | « third_party/crashpad/crashpad/doc/man.md ('k') | third_party/crashpad/crashpad/tools/crashpad_http_upload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698