New issue
Advanced search Search tips

Issue 911929 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 914074



Sign in to add a comment

Delete generated C++ Hash methods for mojom types

Project Member Reported by rockot@google.com, Dec 5

Issue description

We generate a Hash method for any hashable mojom struct, where a mojom struct is hashable iff all its fields are hashable. We only had this because we used to use std::unordered_map to represent mojom maps in C++ bindings.

Now we use base::flat_map which only requires operator<. And while we probably could generated operator< for generated structs and arrays, we clearly haven't had a need for it yet (typemapped types like String16->base::string16 will just work as keys already because only the typemapped type needs an operator<).

So let's delete all the Hash code, including mojo/public/cpp/bindings/hash_util.h and all of the generated code which uses it.

 
Cc: staphany@chromium.org
+staphany@ who may want to take a look at this.
Status: Started (was: Available)
Status: Available (was: Started)
Blockedon: 914074

Sign in to add a comment