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

Side by Side Diff: sandbox/win/src/sidestep/preamble_patcher.h

Issue 16196003: Include stddef.h for the definition of size_t. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove accidentally included file. Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/allocator/allocator_shim.h ('k') | 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 (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 // Definition of PreamblePatcher 5 // Definition of PreamblePatcher
6 6
7 #ifndef SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__ 7 #ifndef SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__
8 #define SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__ 8 #define SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__
9 9
10 #include <stddef.h>
11
10 namespace sidestep { 12 namespace sidestep {
11 13
12 // Maximum size of the preamble stub. We overwrite at least the first 5 14 // Maximum size of the preamble stub. We overwrite at least the first 5
13 // bytes of the function. Considering the worst case scenario, we need 4 15 // bytes of the function. Considering the worst case scenario, we need 4
14 // bytes + the max instruction size + 5 more bytes for our jump back to 16 // bytes + the max instruction size + 5 more bytes for our jump back to
15 // the original code. With that in mind, 32 is a good number :) 17 // the original code. With that in mind, 32 is a good number :)
16 const size_t kMaxPreambleStubSize = 32; 18 const size_t kMaxPreambleStubSize = 32;
17 19
18 // Possible results of patching/unpatching 20 // Possible results of patching/unpatching
19 enum SideStepError { 21 enum SideStepError {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 static SideStepError RawPatchWithStub(void* target_function, 102 static SideStepError RawPatchWithStub(void* target_function,
101 void *replacement_function, 103 void *replacement_function,
102 unsigned char* preamble_stub, 104 unsigned char* preamble_stub,
103 size_t stub_size, 105 size_t stub_size,
104 size_t* bytes_needed); 106 size_t* bytes_needed);
105 }; 107 };
106 108
107 }; // namespace sidestep 109 }; // namespace sidestep
108 110
109 #endif // SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__ 111 #endif // SANDBOX_SRC_SIDESTEP_PREAMBLE_PATCHER_H__
OLDNEW
« no previous file with comments | « base/allocator/allocator_shim.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698