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

Unified Diff: sandbox/win/src/resolver_64.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, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/resolver_32.cc ('k') | sandbox/win/src/restricted_token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/resolver_64.cc
diff --git a/sandbox/win/src/resolver_64.cc b/sandbox/win/src/resolver_64.cc
deleted file mode 100644
index 6a99735444103a95484f4b079f4f0831299dd97c..0000000000000000000000000000000000000000
--- a/sandbox/win/src/resolver_64.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sandbox/win/src/resolver.h"
-
-#include <stddef.h>
-
-// For placement new. This file must not depend on the CRT at runtime, but
-// placement operator new is inline.
-#include <new>
-
-#include "sandbox/win/src/sandbox_nt_util.h"
-
-namespace {
-
-const USHORT kMovRax = 0xB848;
-const USHORT kJmpRax = 0xe0ff;
-
-#pragma pack(push, 1)
-struct InternalThunk {
- // This struct contains roughly the following code:
- // 01 48b8f0debc9a78563412 mov rax,123456789ABCDEF0h
- // ff e0 jmp rax
- //
- // The code modifies rax, but that's fine for x64 ABI.
-
- InternalThunk() {
- mov_rax = kMovRax;
- jmp_rax = kJmpRax;
- interceptor_function = 0;
- };
- USHORT mov_rax; // = 48 B8
- ULONG_PTR interceptor_function;
- USHORT jmp_rax; // = ff e0
-};
-#pragma pack(pop)
-
-} // namespace.
-
-namespace sandbox {
-
-size_t ResolverThunk::GetInternalThunkSize() const {
- return sizeof(InternalThunk);
-}
-
-bool ResolverThunk::SetInternalThunk(void* storage, size_t storage_bytes,
- const void* original_function,
- const void* interceptor) {
- if (storage_bytes < sizeof(InternalThunk))
- return false;
-
- InternalThunk* thunk = new(storage) InternalThunk;
- thunk->interceptor_function = reinterpret_cast<ULONG_PTR>(interceptor);
-
- return true;
-}
-
-NTSTATUS ResolverThunk::ResolveTarget(const void* module,
- const char* function_name,
- void** address) {
- // We don't support sidestep & co.
- return STATUS_NOT_IMPLEMENTED;
-}
-
-} // namespace sandbox
« no previous file with comments | « sandbox/win/src/resolver_32.cc ('k') | sandbox/win/src/restricted_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698