Amalgamated source for v22.1
Change-Id: I55e62476a0863715e5ee21a885bc7fdd4108799b
diff --git a/sdk/perfetto.cc b/sdk/perfetto.cc
index 0b9ab07..c909ae2 100644
--- a/sdk/perfetto.cc
+++ b/sdk/perfetto.cc
@@ -15,14 +15,14 @@
// This file is automatically generated by gen_amalgamated. Do not edit.
// gen_amalgamated: predefined macros
-#if !defined(GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER)
-#define GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+#if !defined(GOOGLE_PROTOBUF_NO_RTTI)
+#define GOOGLE_PROTOBUF_NO_RTTI
#endif
#if !defined(PERFETTO_IMPLEMENTATION)
#define PERFETTO_IMPLEMENTATION
#endif
-#if !defined(GOOGLE_PROTOBUF_NO_RTTI)
-#define GOOGLE_PROTOBUF_NO_RTTI
+#if !defined(GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER)
+#define GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
#endif
#include "perfetto.h"
// gen_amalgamated begin source: src/base/android_utils.cc
@@ -3120,15 +3120,14 @@
if (glob_path.length() + 1 > MAX_PATH)
return base::ErrStatus("Directory path %s is too long", dir_path.c_str());
WIN32_FIND_DATAA ffd;
- // We do not use a ScopedResource for the HANDLE from FindFirstFile because
- // the invalid value INVALID_HANDLE_VALUE is not a constexpr under some
- // compile configurations, and thus cannot be used as a template argument.
- HANDLE hFind = FindFirstFileA(glob_path.c_str(), &ffd);
- if (hFind == INVALID_HANDLE_VALUE) {
+
+ base::ScopedResource<HANDLE, FindClose, nullptr, false,
+ base::PlatformHandleChecker>
+ hFind(FindFirstFileA(glob_path.c_str(), &ffd));
+ if (!hFind) {
// For empty directories, there should be at least one entry '.'.
// If FindFirstFileA returns INVALID_HANDLE_VALUE, this means directory
// couldn't be accessed.
- FindClose(hFind);
return base::ErrStatus("Failed to open directory %s", cur_dir.c_str());
}
do {
@@ -3137,13 +3136,12 @@
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
std::string subdir_path = cur_dir + ffd.cFileName + '/';
dir_queue.push_back(subdir_path);
- } else if (ffd.dwFileAttributes & FILE_ATTRIBUTE_NORMAL) {
+ } else {
const std::string full_path = cur_dir + ffd.cFileName;
PERFETTO_CHECK(full_path.length() > root_dir_path.length());
output.push_back(full_path.substr(root_dir_path.length()));
}
- } while (FindNextFileA(hFind, &ffd));
- FindClose(hFind);
+ } while (FindNextFileA(*hFind, &ffd));
#else
ScopedDir dir = ScopedDir(opendir(cur_dir.c_str()));
if (!dir) {
@@ -6799,8 +6797,8 @@
#ifndef GEN_PERFETTO_VERSION_GEN_H_
#define GEN_PERFETTO_VERSION_GEN_H_
-#define PERFETTO_VERSION_STRING() "v22.0-e9e81c015"
-#define PERFETTO_VERSION_SCM_REVISION() "e9e81c01529610f02f63a87122c5bd878972ef7b"
+#define PERFETTO_VERSION_STRING() "v22.1-fa9722821"
+#define PERFETTO_VERSION_SCM_REVISION() "fa97228215c6c58574fbd64ac92487c31c9a4d73"
#endif // GEN_PERFETTO_VERSION_GEN_H_
/*