mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Clear the input array passed to CefBrowser::GetFrameIdentifiers so that the correct values are returned via the C/C++ wrapper API, and add a test (issue #626).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@665 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -434,6 +434,9 @@ size_t CefBrowserHostImpl::GetFrameCount() {
|
||||
void CefBrowserHostImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
|
||||
if (identifiers.size() > 0)
|
||||
identifiers.clear();
|
||||
|
||||
FrameMap::const_iterator it = frames_.begin();
|
||||
for (; it != frames_.end(); ++it)
|
||||
identifiers.push_back(it->first);
|
||||
@ -442,6 +445,9 @@ void CefBrowserHostImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
|
||||
void CefBrowserHostImpl::GetFrameNames(std::vector<CefString>& names) {
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
|
||||
if (names.size() > 0)
|
||||
names.clear();
|
||||
|
||||
FrameMap::const_iterator it = frames_.begin();
|
||||
for (; it != frames_.end(); ++it)
|
||||
names.push_back(it->second->GetName());
|
||||
|
Reference in New Issue
Block a user