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

Side by Side Diff: sandbox/win/src/sidestep/preamble_patcher_with_stub.cpp

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 4 years, 12 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 | « sandbox/win/src/sharedmem_ipc_server.cc ('k') | sandbox/win/src/sidestep_resolver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implementation of PreamblePatcher 5 // Implementation of PreamblePatcher
6 6
7 #include "sandbox/win/src/sidestep/preamble_patcher.h" 7 #include "sandbox/win/src/sidestep/preamble_patcher.h"
8 8
9 #include <stddef.h>
10
9 #include "sandbox/win/src/sandbox_nt_util.h" 11 #include "sandbox/win/src/sandbox_nt_util.h"
10 #include "sandbox/win/src/sidestep/mini_disassembler.h" 12 #include "sandbox/win/src/sidestep/mini_disassembler.h"
11 13
12 // Definitions of assembly statements we need 14 // Definitions of assembly statements we need
13 #define ASM_JMP32REL 0xE9 15 #define ASM_JMP32REL 0xE9
14 #define ASM_INT3 0xCC 16 #define ASM_INT3 0xCC
15 17
16 namespace { 18 namespace {
17 19
18 // Very basic memcpy. We are copying 4 to 12 bytes most of the time, so there 20 // Very basic memcpy. We are copying 4 to 12 bytes most of the time, so there
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // stub contains the first stub_size bytes of the original target 172 // stub contains the first stub_size bytes of the original target
171 // function's preamble code, followed by a relative jump back to the next 173 // function's preamble code, followed by a relative jump back to the next
172 // instruction after the first cbPreamble bytes. 174 // instruction after the first cbPreamble bytes.
173 175
174 return SIDESTEP_SUCCESS; 176 return SIDESTEP_SUCCESS;
175 } 177 }
176 178
177 }; // namespace sidestep 179 }; // namespace sidestep
178 180
179 #undef ASSERT 181 #undef ASSERT
OLDNEW
« no previous file with comments | « sandbox/win/src/sharedmem_ipc_server.cc ('k') | sandbox/win/src/sidestep_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698