Mostly remove refcount thrashes of value in setAttribute.
Relanding https://chromium-review.googlesource.com/c/chromium/src/+/2351950 This mostly removes the refcount thrashes in Element::setAttribute() which accounts for nearly 13% of regression in blink_perf.bindings set-attribute.html story when StringImpl is made threadsafe. Because of some reentrant behavior in Element::setAttribute() -> Element::SetAttributeInternal() -> Element::DidModifyAttribute() -> Element::AttributeChanged() -> Element::ParseAttribute() -> Element::setAttribute(), the qname for the Attribute, the old value, and the new value cannot be easily transfered into the Element's internal ElementData::Attributes() collection while also publishing the change to observers via the DidModifyAttribute() call. Removal of that thrash will be done in a follow-up CL. Bug: 1083392 Change-Id: I7f7f4bfa22a2e553e703c0375bd04bb77f71de23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2369348Reviewed-by:Jeremy Roman <jbroman@chromium.org> Commit-Queue: Albert J. Wong <ajwong@chromium.org> Auto-Submit: Albert J. Wong <ajwong@chromium.org> Cr-Commit-Position: refs/heads/master@{#801214}
Showing
Please register or sign in to comment