Don't hash custom element names when looking up definitions.
Mapping a custom element constructor to its definition used to look in a JavaScript map from constructor to custom element name string, and then hash that name to look up the custom element definition in the registry. After this change the JavaScript map values are IDs so the definition can be retrieved directly from a vector. This avoids marshaling the name string from V8 to C++, and avoids hashing the string, to look up a definition. (There's still a map from name to ID on the side so that CustomElementRegistry.get can look up definitions by name, but it is not used in common operations like creating a custom element.) Bug: 710184 Change-Id: I90ee5759bf692b5a2df43a4a59ef4fac94d22f2c Reviewed-on: https://chromium-review.googlesource.com/520543 Commit-Queue: Dominic Cooney <dominicc@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Hayato Ito <hayato@chromium.org> Cr-Commit-Position: refs/heads/master@{#476504}
Showing
Please register or sign in to comment