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

Side by Side Diff: minidump/minidump_context_writer.cc

Issue 893393002: win: Locally disable allocation alignment warning (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump-next
Patch Set: x86 only Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 21 matching lines...) Expand all
32 32
33 switch (context_snapshot->architecture) { 33 switch (context_snapshot->architecture) {
34 case kCPUArchitectureX86: { 34 case kCPUArchitectureX86: {
35 MinidumpContextX86Writer* context_x86 = new MinidumpContextX86Writer(); 35 MinidumpContextX86Writer* context_x86 = new MinidumpContextX86Writer();
36 context.reset(context_x86); 36 context.reset(context_x86);
37 context_x86->InitializeFromSnapshot(context_snapshot->x86); 37 context_x86->InitializeFromSnapshot(context_snapshot->x86);
38 break; 38 break;
39 } 39 }
40 40
41 case kCPUArchitectureX86_64: { 41 case kCPUArchitectureX86_64: {
42 #if defined(COMPILER_MSVC) && defined(ARCH_CPU_X86)
43 #pragma warning(push)
44 #pragma warning(disable: 4316) // Object allocated on the heap may not be 16
45 // byte aligned.
46 #endif
42 MinidumpContextAMD64Writer* context_amd64 = 47 MinidumpContextAMD64Writer* context_amd64 =
43 new MinidumpContextAMD64Writer(); 48 new MinidumpContextAMD64Writer();
49 #if defined(COMPILER_MSVC) && defined(ARCH_CPU_X86)
50 #pragma warning(pop)
51 #endif
44 context.reset(context_amd64); 52 context.reset(context_amd64);
45 context_amd64->InitializeFromSnapshot(context_snapshot->x86_64); 53 context_amd64->InitializeFromSnapshot(context_snapshot->x86_64);
46 break; 54 break;
47 } 55 }
48 56
49 default: { 57 default: {
50 LOG(ERROR) << "unknown context architecture " 58 LOG(ERROR) << "unknown context architecture "
51 << context_snapshot->architecture; 59 << context_snapshot->architecture;
52 break; 60 break;
53 } 61 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return file_writer->Write(&context_, sizeof(context_)); 211 return file_writer->Write(&context_, sizeof(context_));
204 } 212 }
205 213
206 size_t MinidumpContextAMD64Writer::ContextSize() const { 214 size_t MinidumpContextAMD64Writer::ContextSize() const {
207 DCHECK_GE(state(), kStateFrozen); 215 DCHECK_GE(state(), kStateFrozen);
208 216
209 return sizeof(context_); 217 return sizeof(context_);
210 } 218 }
211 219
212 } // namespace crashpad 220 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698