Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/mojo/src/mojo/public/cpp/bindings/lib/map_data_internal.h

Issue 1310103002: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698