| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)IS_MAC to not include iOS in this.
ScopedFileHandle handle(
LoggingOpenFileForRead(attachment));
if (!handle.is_valid()) {
continue;
}
constexpr size_t kBufSize = 4096;
char buf[kBufSize];
FileOperationResult count;
while ((count = ReadFile(handle.get(), buf, kBufSize)) > 0) {
if (!writer->Write(buf, count)) {
LOG(WARNING) << "Failed to write to attachment";
break;
}
}
}Open the file with a FileReader and you can use CopyFileContent().
https://source.chromium.org/chromium/chromium/src/+/main:third_party/crashpad/crashpad/util/file/file_reader.h;drc=9369044d135466db00f0abb5828f55821c0341d8;l=99
https://source.chromium.org/chromium/chromium/src/+/main:third_party/crashpad/crashpad/util/file/file_helper.h;l=24
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adding Mark to review the changes to the MacOS client.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
IS_MAC to not include iOS in this.
Done
ScopedFileHandle handle(
LoggingOpenFileForRead(attachment));
if (!handle.is_valid()) {
continue;
}
constexpr size_t kBufSize = 4096;
char buf[kBufSize];
FileOperationResult count;
while ((count = ReadFile(handle.get(), buf, kBufSize)) > 0) {
if (!writer->Write(buf, count)) {
LOG(WARNING) << "Failed to write to attachment";
break;
}
}
}Open the file with a FileReader and you can use CopyFileContent().
https://source.chromium.org/chromium/chromium/src/+/main:third_party/crashpad/crashpad/util/file/file_reader.h;drc=9369044d135466db00f0abb5828f55821c0341d8;l=99
https://source.chromium.org/chromium/chromium/src/+/main:third_party/crashpad/crashpad/util/file/file_helper.h;l=24
Fix applied.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)Yilong YaoIS_MAC to not include iOS in this.
Done
Note this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)Yilong YaoIS_MAC to not include iOS in this.
Yilong YaoDone
Note this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.
I think handler_main.cc and crash_report_exception_handler.cc shouldn't be used on iOS at all (I guess my initial comment wasn't needed). I think you could put the "handler" and "handler_test" targets in "if (!crashpad_is_ios) {}" blocks to avoid building this code on iOS.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)Yilong YaoIS_MAC to not include iOS in this.
Yilong YaoDone
Joshua PerazaNote this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.
I think handler_main.cc and crash_report_exception_handler.cc shouldn't be used on iOS at all (I guess my initial comment wasn't needed). I think you could put the "handler" and "handler_test" targets in "if (!crashpad_is_ios) {}" blocks to avoid building this code on iOS.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Ping if there's anything I should change on this CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
Thank you!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Add support for attachments on macOS.
This change modifies the Crashpad client on macOS to accept a list of
file paths as attachments. These attachments are passed as arguments to
the handler process. The macOS exception handler is updated to read
these files and include them in the generated crash report.
DISALBE_SPELLCHECKER: Existing comment
Change-Id: Icf74714c76215ea61136287d1118ac3795d6f6d8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/7214128
Reviewed-by: Joshua Peraza <jpe...@chromium.org>
Reviewed-by: Ivan Penkov <iva...@google.com>
Commit-Queue: Yilong Yao <yilo...@google.com>
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |