diff options
| author | caitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-07 22:06:31 +0000 |
|---|---|---|
| committer | caitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-07 22:06:31 +0000 |
| commit | 72d2d1b7f043edf5fe4e89a37e60e665dd747626 (patch) | |
| tree | 6c905cb919cfa8a2d157cbdd6ab6069f4de87277 /sandbox/win/src/service_resolver_64.cc | |
| parent | 9d57a12d685b3847a31cefb2748723d3497bcfc6 (diff) | |
| download | chromium_src-72d2d1b7f043edf5fe4e89a37e60e665dd747626.zip chromium_src-72d2d1b7f043edf5fe4e89a37e60e665dd747626.tar.gz chromium_src-72d2d1b7f043edf5fe4e89a37e60e665dd747626.tar.bz2 | |
Revert 255151 "Make chrome_elf use thunks instead of function po..."
(Crashy on today's canary)
> Make chrome_elf use thunks instead of function pointers.
>
> 1. Add functionality to ServiceResolverThunk to copy a thunk without patching.
> 2. Move chrome_elf thunk-handling code to a common location.
> 3. Use a thunk instead of a f'n ptr for redirects.
>
> BUG=334379
>
> Review URL: https://codereview.chromium.org/183833004
TBR=caitkp@chromium.org
Review URL: https://codereview.chromium.org/189803007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/win/src/service_resolver_64.cc')
| -rw-r--r-- | sandbox/win/src/service_resolver_64.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sandbox/win/src/service_resolver_64.cc b/sandbox/win/src/service_resolver_64.cc index 79c6b16..9612418 100644 --- a/sandbox/win/src/service_resolver_64.cc +++ b/sandbox/win/src/service_resolver_64.cc @@ -116,30 +116,6 @@ size_t ServiceResolverThunk::GetThunkSize() const { return sizeof(ServiceFullThunk); } -NTSTATUS ServiceResolverThunk::CopyThunk(const void* target_module, - const char* target_name, - BYTE* thunk_storage, - size_t storage_bytes, - size_t* storage_used) { - NTSTATUS ret = ResolveTarget(target_module, target_name, &target_); - if (!NT_SUCCESS(ret)) - return ret; - - size_t thunk_bytes = GetThunkSize(); - if (storage_bytes < thunk_bytes) - return STATUS_UNSUCCESSFUL; - - ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>(thunk_storage); - - if (!IsFunctionAService(&thunk->original)) - return STATUS_UNSUCCESSFUL; - - if (NULL != storage_used) - *storage_used = thunk_bytes; - - return ret; -} - bool ServiceResolverThunk::IsFunctionAService(void* local_thunk) const { ServiceFullThunk function_code; SIZE_T read; |
