OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 5 |
6 #ifndef CHROME_FRAME_FUNCTION_STUB_H_ | 6 #ifndef CHROME_FRAME_FUNCTION_STUB_H_ |
7 #define CHROME_FRAME_FUNCTION_STUB_H_ | 7 #define CHROME_FRAME_FUNCTION_STUB_H_ |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include "base/logging.h" | 10 |
| 11 #include "base/basictypes.h" |
11 | 12 |
12 // IMPORTANT: The struct below must be byte aligned. | 13 // IMPORTANT: The struct below must be byte aligned. |
13 #pragma pack(push) | 14 #pragma pack(push) |
14 #pragma pack(1) | 15 #pragma pack(1) |
15 | 16 |
16 struct FunctionStubAsm { | 17 struct FunctionStubAsm { |
17 // The stub always starts with an indirect jump, which starts out jumping | 18 // The stub always starts with an indirect jump, which starts out jumping |
18 // to the remainder of the stub. This means we can bypass the stub by | 19 // to the remainder of the stub. This means we can bypass the stub by |
19 // rewriting the jump destination, which is data, in a manner that does | 20 // rewriting the jump destination, which is data, in a manner that does |
20 // not involve writing code, only writing data at a natural word boundary. | 21 // not involve writing code, only writing data at a natural word boundary. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 uintptr_t argument_; | 133 uintptr_t argument_; |
133 // Bypass address, if this is the address of the pop_return_addr_, the | 134 // Bypass address, if this is the address of the pop_return_addr_, the |
134 // function stub is not bypassed. | 135 // function stub is not bypassed. |
135 uintptr_t bypass_address_; | 136 uintptr_t bypass_address_; |
136 // The destination function we dispatch to, not used if the stub | 137 // The destination function we dispatch to, not used if the stub |
137 // is bypassed. | 138 // is bypassed. |
138 uintptr_t destination_function_; | 139 uintptr_t destination_function_; |
139 }; | 140 }; |
140 | 141 |
141 #endif // CHROME_FRAME_FUNCTION_STUB_H_ | 142 #endif // CHROME_FRAME_FUNCTION_STUB_H_ |
OLD | NEW |