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

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

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 years, 5 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 | « sandbox/win/src/sidestep/preamble_patcher.h ('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/src/sidestep/preamble_patcher.h" 7 #include "sandbox/win/src/sidestep/preamble_patcher.h"
8 8
9 #include "sandbox/src/sandbox_nt_util.h" 9 #include "sandbox/win/src/sandbox_nt_util.h"
10 #include "sandbox/src/sidestep/mini_disassembler.h" 10 #include "sandbox/win/src/sidestep/mini_disassembler.h"
11 11
12 // Definitions of assembly statements we need 12 // Definitions of assembly statements we need
13 #define ASM_JMP32REL 0xE9 13 #define ASM_JMP32REL 0xE9
14 #define ASM_INT3 0xCC 14 #define ASM_INT3 0xCC
15 15
16 namespace { 16 namespace {
17 17
18 // Very basic memcpy. We are copying 4 to 12 bytes most of the time, so there 18 // Very basic memcpy. We are copying 4 to 12 bytes most of the time, so there
19 // is no attempt to optimize this code or have a general purpose function. 19 // is no attempt to optimize this code or have a general purpose function.
20 // We don't want to call the crt from this code. 20 // We don't want to call the crt from this code.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // stub contains the first stub_size bytes of the original target 170 // 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 171 // function's preamble code, followed by a relative jump back to the next
172 // instruction after the first cbPreamble bytes. 172 // instruction after the first cbPreamble bytes.
173 173
174 return SIDESTEP_SUCCESS; 174 return SIDESTEP_SUCCESS;
175 } 175 }
176 176
177 }; // namespace sidestep 177 }; // namespace sidestep
178 178
179 #undef ASSERT 179 #undef ASSERT
OLDNEW
« no previous file with comments | « sandbox/win/src/sidestep/preamble_patcher.h ('k') | sandbox/win/src/sidestep_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698