Change description:
Re-implement select DOM accessors for improved speed:
Use V8-assembled accessors, which allows us to re-implement several simple DOM accessors (firstChild, nextChild, previousSibling, nextSibling) so that V8 can compile the accessor code directly within V8, at least in the common case. This way, an access to these accessors from JavaScript can be executed entirely within the V8 runtime and does not require V8 to jump back into the C++ runtime and into the Blink bindings.
Changes to API surface:
n/a
(The implementation follows https://dom.spec.whatwg.org/#interface-node, as does the current implementation. This work should not be observable except for performance.)
Links:
- Spec: https://dom.spec.whatwg.org/#interface-node
- Not quite-up-to-date design doc:
https://docs.google.com/document/d/1vUikYhhI6LlD2GYpijrPTm5f5MuouMJ0AQhFhFH2XGY/view
- Implementation tracking bug: https://crbug.com/508898
Support in other browsers:
(I didn't check, but I'm fairly certain they all implement DOM access.)
Other:
[Label OWP-Type-ChangeBehavior] is technically wrong, since this doesn't change behaviour. I picked it because I didn't find a label for performance-only change.
Comment 1 by owe...@chromium.org
, Sep 12 2017