- Revert: Change index parameter types from int to size_t to make 0-based range implicit.

- Add checks that index values are >= 0.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@409 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-08 10:22:15 +00:00
parent 64e08c2918
commit ef64033467
15 changed files with 137 additions and 51 deletions

View File

@ -477,13 +477,17 @@ int CEF_CALLBACK v8value_has_value_bykey(struct _cef_v8value_t* self,
int CEF_CALLBACK v8value_has_value_byindex(struct _cef_v8value_t* self,
size_t index)
int index)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->HasValue(
@ -517,13 +521,17 @@ int CEF_CALLBACK v8value_delete_value_bykey(struct _cef_v8value_t* self,
int CEF_CALLBACK v8value_delete_value_byindex(struct _cef_v8value_t* self,
size_t index)
int index)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefV8ValueCppToC::Get(self)->DeleteValue(
@ -557,13 +565,17 @@ struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_bykey(
struct _cef_v8value_t* CEF_CALLBACK v8value_get_value_byindex(
struct _cef_v8value_t* self, size_t index)
struct _cef_v8value_t* self, int index)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefV8Value> _retval = CefV8ValueCppToC::Get(self)->GetValue(
@ -604,13 +616,17 @@ int CEF_CALLBACK v8value_set_value_bykey(struct _cef_v8value_t* self,
int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self,
size_t index, struct _cef_v8value_t* value)
int index, struct _cef_v8value_t* value)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return 0;
// Verify param: value; type: refptr_same
DCHECK(value);
if (!value)