| Index: snapshot/win/exception_snapshot_win.cc
|
| diff --git a/snapshot/win/exception_snapshot_win.cc b/snapshot/win/exception_snapshot_win.cc
|
| index 731669ad49cd41c58a5d26ae2abdb1cfb6c9b252..8dc5e460e1c0b55bffae19a93fa3a4c0d09f676c 100644
|
| --- a/snapshot/win/exception_snapshot_win.cc
|
| +++ b/snapshot/win/exception_snapshot_win.cc
|
| @@ -134,11 +134,20 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
| LOG(ERROR) << "EXCEPTION_POINTERS read failed";
|
| return false;
|
| }
|
| - if (!exception_pointers.ExceptionRecord) {
|
| - LOG(ERROR) << "null ExceptionRecord";
|
| +
|
| + if (!process_reader.ReadMemory(
|
| + static_cast<WinVMAddress>(exception_pointers.ContextRecord),
|
| + sizeof(*context_record),
|
| + context_record)) {
|
| + LOG(ERROR) << "ContextRecord";
|
| return false;
|
| }
|
|
|
| + if (!exception_pointers.ExceptionRecord) {
|
| + // ExceptionRecord can be null when we're doing a DumpWithoutCrash().
|
| + return true;
|
| + }
|
| +
|
| ExceptionRecordType first_record;
|
| if (!process_reader.ReadMemory(
|
| static_cast<WinVMAddress>(exception_pointers.ExceptionRecord),
|
| @@ -157,14 +166,6 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
| LOG(WARNING) << "dropping chained ExceptionRecord";
|
| }
|
|
|
| - if (!process_reader.ReadMemory(
|
| - static_cast<WinVMAddress>(exception_pointers.ContextRecord),
|
| - sizeof(*context_record),
|
| - context_record)) {
|
| - LOG(ERROR) << "ContextRecord";
|
| - return false;
|
| - }
|
| -
|
| return true;
|
| }
|
|
|
|
|