Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h |
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h |
index 8315dbc8e10e615ba4437c21174ba628dc3c5b5a..6d629b40e8aba7ed02af947b435a3d5df4a4643a 100644 |
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h |
+++ b/third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h |
@@ -13,22 +13,25 @@ |
namespace mojo { |
namespace internal { |
-inline const ArrayValidateParams* GetMapKeyValidateParamsDefault() { |
- // The memory allocated here never gets released to not cause an exit time |
- // destructor. |
+namespace { |
+const ArrayValidateParams* GetMapKeyValidateParamsDefault() { |
+ // The memory allocated here never gets released because calling a |
+ // destructor at exit time makes clang unhappy. |
static const ArrayValidateParams* validate_params = |
new ArrayValidateParams(0, false, nullptr); |
return validate_params; |
} |
-inline const ArrayValidateParams* GetMapKeyValidateParamsForStrings() { |
- // The memory allocated here never gets released to not cause an exit time |
- // destructor. |
+const ArrayValidateParams* GetMapKeyValidateParamsForStrings() { |
+ // The memory allocated here never gets released because calling a |
+ // destructor at exit time makes clang unhappy. |
static const ArrayValidateParams* validate_params = new ArrayValidateParams( |
0, false, new ArrayValidateParams(0, false, nullptr)); |
return validate_params; |
} |
+} // namespace |
+ |
template <typename MapKey> |
struct MapKeyValidateParamsFactory { |
static const ArrayValidateParams* Get() { |