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())
|
||||
|
@@ -49,14 +49,14 @@ public:
|
||||
virtual CefTime GetDateValue() OVERRIDE;
|
||||
virtual CefString GetStringValue() OVERRIDE;
|
||||
virtual bool HasValue(const CefString& key) OVERRIDE;
|
||||
virtual bool HasValue(size_t index) OVERRIDE;
|
||||
virtual bool HasValue(int index) OVERRIDE;
|
||||
virtual bool DeleteValue(const CefString& key) OVERRIDE;
|
||||
virtual bool DeleteValue(size_t index) OVERRIDE;
|
||||
virtual bool DeleteValue(int index) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(const CefString& key) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(size_t index) OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Value> GetValue(int index) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, CefRefPtr<CefV8Value> value,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
virtual bool SetValue(size_t index, CefRefPtr<CefV8Value> value) OVERRIDE;
|
||||
virtual bool SetValue(int index, CefRefPtr<CefV8Value> value) OVERRIDE;
|
||||
virtual bool SetValue(const CefString& key, AccessControl settings,
|
||||
PropertyAttribute attribute) OVERRIDE;
|
||||
virtual bool GetKeys(std::vector<CefString>& keys) OVERRIDE;
|
||||
|
@@ -315,13 +315,18 @@ size_t CefXmlReaderCToCpp::GetAttributeCount()
|
||||
}
|
||||
|
||||
|
||||
CefString CefXmlReaderCToCpp::GetAttribute(size_t index)
|
||||
CefString CefXmlReaderCToCpp::GetAttribute(int index)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, get_attribute_byindex))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: index; type: simple_byval
|
||||
DCHECK(index >= 0);
|
||||
if (index < 0)
|
||||
return CefString();
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_attribute_byindex(struct_,
|
||||
index);
|
||||
@@ -434,13 +439,18 @@ int CefXmlReaderCToCpp::GetLineNumber()
|
||||
}
|
||||
|
||||
|
||||
bool CefXmlReaderCToCpp::MoveToAttribute(size_t index)
|
||||
bool CefXmlReaderCToCpp::MoveToAttribute(int index)
|
||||
{
|
||||
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_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_->move_to_attribute_byindex(struct_,
|
||||
index);
|
||||
|
@@ -49,14 +49,14 @@ public:
|
||||
virtual CefString GetValue() OVERRIDE;
|
||||
virtual bool HasAttributes() OVERRIDE;
|
||||
virtual size_t GetAttributeCount() OVERRIDE;
|
||||
virtual CefString GetAttribute(size_t index) OVERRIDE;
|
||||
virtual CefString GetAttribute(int index) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
virtual CefString GetInnerXml() OVERRIDE;
|
||||
virtual CefString GetOuterXml() OVERRIDE;
|
||||
virtual int GetLineNumber() OVERRIDE;
|
||||
virtual bool MoveToAttribute(size_t index) OVERRIDE;
|
||||
virtual bool MoveToAttribute(int index) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
|
Reference in New Issue
Block a user