summaryrefslogtreecommitdiffstats
path: root/sandbox/src/crosscall_server.cc
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 20:59:39 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 20:59:39 +0000
commita37a999f87eed77b08e7e1b6bdb86d406f31ea9b (patch)
tree070577d8aebd6b62788e64bb4c94e1106abc34aa /sandbox/src/crosscall_server.cc
parent836f9d7211bb84b2d6ff5c8cc33630599ddeee51 (diff)
downloadchromium_src-a37a999f87eed77b08e7e1b6bdb86d406f31ea9b.zip
chromium_src-a37a999f87eed77b08e7e1b6bdb86d406f31ea9b.tar.gz
chromium_src-a37a999f87eed77b08e7e1b6bdb86d406f31ea9b.tar.bz2
Secound round of sbox changes for 64 bit port
- Handling pointer sized items - Beefing up unit tests - Beefing up integration tests - Enabling Process, Thread and Token IPCs - Making validation tests compile again BUG=27218 TEST= unit tests included Review URL: http://codereview.chromium.org/757001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/crosscall_server.cc')
-rw-r--r--sandbox/src/crosscall_server.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/sandbox/src/crosscall_server.cc b/sandbox/src/crosscall_server.cc
index 35e80f4..da43c69 100644
--- a/sandbox/src/crosscall_server.cc
+++ b/sandbox/src/crosscall_server.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
@@ -176,7 +176,7 @@ void* CrossCallParamsEx::GetRawParameter(size_t index, size_t* size,
}
// Covers common case for 32 bit integers.
-bool CrossCallParamsEx::GetParameter32(size_t index, void* param) {
+bool CrossCallParamsEx::GetParameter32(size_t index, uint32* param) {
size_t size = 0;
ArgType type;
void* start = GetRawParameter(index, &size, &type);
@@ -188,6 +188,17 @@ bool CrossCallParamsEx::GetParameter32(size_t index, void* param) {
return true;
}
+bool CrossCallParamsEx::GetParameterVoidPtr(size_t index, void** param) {
+ size_t size = 0;
+ ArgType type;
+ void* start = GetRawParameter(index, &size, &type);
+ if ((NULL == start) || (sizeof(void*) != size) || (VOIDPTR_TYPE != type)) {
+ return false;
+ }
+ *param = *(reinterpret_cast<void**>(start));
+ return true;
+}
+
// Covers the common case of reading a string. Note that the string is not
// scanned for invalid characters.
bool CrossCallParamsEx::GetParameterStr(size_t index, std::wstring* string) {