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

Unified Diff: sandbox/src/crosscall_server.cc

Issue 757001: Second round of sbox changes for 64 bit port... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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/src/crosscall_server.h ('k') | sandbox/src/interceptors_64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « sandbox/src/crosscall_server.h ('k') | sandbox/src/interceptors_64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698