diff --git a/mojo/public/cpp/bindings/lib/map_data_internal.h b/mojo/public/cpp/bindings/lib/map_data_internal.h index 6d629b40e8a..8315dbc8e10 100644 --- a/mojo/public/cpp/bindings/lib/map_data_internal.h +++ b/mojo/public/cpp/bindings/lib/map_data_internal.h @@ -13,25 +13,22 @@ namespace mojo { namespace internal { -namespace { -const ArrayValidateParams* GetMapKeyValidateParamsDefault() { - // The memory allocated here never gets released because calling a - // destructor at exit time makes clang unhappy. +inline const ArrayValidateParams* GetMapKeyValidateParamsDefault() { + // The memory allocated here never gets released to not cause an exit time + // destructor. static const ArrayValidateParams* validate_params = new ArrayValidateParams(0, false, nullptr); return validate_params; } -const ArrayValidateParams* GetMapKeyValidateParamsForStrings() { - // The memory allocated here never gets released because calling a - // destructor at exit time makes clang unhappy. +inline const ArrayValidateParams* GetMapKeyValidateParamsForStrings() { + // The memory allocated here never gets released to not cause an exit time + // destructor. static const ArrayValidateParams* validate_params = new ArrayValidateParams( 0, false, new ArrayValidateParams(0, false, nullptr)); return validate_params; } -} // namespace - template struct MapKeyValidateParamsFactory { static const ArrayValidateParams* Get() { diff --git a/mojo/public/tools/dart_pkg.py b/mojo/public/tools/dart_pkg.py index 28cc8ae0566..e9e0384c7a2 100755 --- a/mojo/public/tools/dart_pkg.py +++ b/mojo/public/tools/dart_pkg.py @@ -286,20 +286,6 @@ def main(): target = os.path.join(sdk_ext_dir, relative_source) copy_or_link(source, target) - lib_mojom_path = os.path.join(lib_path, "mojom") - - # Copy generated mojom.dart files. - # HACK(johnmccutchan): This entire step will be removed once all DartPackage - # annotations are in place. Until then, skip doing this for the mojo and - # mojo_services packages. - if (args.package_name != 'mojo') and (args.package_name != 'mojo_services'): - generated_mojom_lib_path = os.path.join(args.gen_directory, "mojom/lib") - for mojom_source_path in args.mojom_sources: - path = mojom_path(mojom_source_path) - source_path = '%s.dart' % os.path.join(generated_mojom_lib_path, path) - target_path = '%s.dart' % os.path.join(lib_mojom_path, path) - copy(source_path, target_path) - # Symlink packages/ package_path = os.path.join(args.package_root, args.package_name) link(lib_path, package_path)