mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@@ -452,13 +452,18 @@ bool CefV8ValueCToCpp::HasValue(const CefString& key)
|
||||
}
|
||||
|
||||
|
||||
bool CefV8ValueCToCpp::HasValue(size_t index)
|
||||
bool CefV8ValueCToCpp::HasValue(int index)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, has_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK(index >= 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->has_value_byindex(struct_,
|
||||
index);
|
||||
@@ -489,13 +494,18 @@ bool CefV8ValueCToCpp::DeleteValue(const CefString& key)
|
||||
}
|
||||
|
||||
|
||||
bool CefV8ValueCToCpp::DeleteValue(size_t index)
|
||||
bool CefV8ValueCToCpp::DeleteValue(int index)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, delete_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK(index >= 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->delete_value_byindex(struct_,
|
||||
index);
|
||||
@@ -526,13 +536,18 @@ CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(const CefString& key)
|
||||
}
|
||||
|
||||
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(size_t index)
|
||||
CefRefPtr<CefV8Value> CefV8ValueCToCpp::GetValue(int index)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, get_value_byindex))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK(index >= 0);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_v8value_t* _retval = struct_->get_value_byindex(struct_,
|
||||
index);
|
||||
@@ -570,13 +585,17 @@ bool CefV8ValueCToCpp::SetValue(const CefString& key,
|
||||
}
|
||||
|
||||
|
||||
bool CefV8ValueCToCpp::SetValue(size_t index, CefRefPtr<CefV8Value> value)
|
||||
bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr<CefV8Value> value)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, set_value_byindex))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK(index >= 0);
|
||||
if (index < 0)
|
||||
return false;
|
||||
// Verify param: value; type: refptr_same
|
||||
DCHECK(value.get());
|
||||
if (!value.get())
|
||||
|
Reference in New Issue
Block a user