Index: sandbox/src/crosscall_server.cc |
=================================================================== |
--- sandbox/src/crosscall_server.cc (revision 40929) |
+++ sandbox/src/crosscall_server.cc (working copy) |
@@ -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 @@ |
} |
// 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 @@ |
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) { |