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

Side by Side Diff: sandbox/win/wow_helper/target_code.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 8 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/wow_helper/target_code.h ('k') | sandbox/win/wow_helper/wow_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "sandbox/win/wow_helper/target_code.h"
6
7 namespace sandbox {
8
9 // Hooks NtMapViewOfSection to detect the load of dlls.
10 NTSTATUS WINAPI TargetNtMapViewOfSection(
11 PatchInfo *patch_info, HANDLE process, PVOID *base, ULONG_PTR zero_bits,
12 SIZE_T commit_size, PLARGE_INTEGER offset, PSIZE_T view_size,
13 SECTION_INHERIT inherit, ULONG allocation_type, ULONG protect) {
14 NTSTATUS ret = patch_info->orig_MapViewOfSection(patch_info->section, process,
15 base, zero_bits, commit_size,
16 offset, view_size, inherit,
17 allocation_type, protect);
18
19 LARGE_INTEGER timeout;
20 timeout.QuadPart = -(5 * 10000000); // 5 seconds.
21
22 // The wait is alertable.
23 patch_info->signal_and_wait(patch_info->dll_load, patch_info->continue_load,
24 TRUE, &timeout);
25
26 return ret;
27 }
28
29 // Marks the end of the code to copy to the target process.
30 NTSTATUS WINAPI TargetEnd() {
31 return STATUS_SUCCESS;
32 }
33
34 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/wow_helper/target_code.h ('k') | sandbox/win/wow_helper/wow_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698