diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-10 08:18:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-10 08:18:27 -0700 |
commit | 01ec8491d3200d6710336da1bb0f4e01b49dc4bc (patch) | |
tree | 7baa166b856fce7ca3832db5f683795427058f90 /components/script/dom/htmldivelement.rs | |
parent | 287969f7bb3df62321ba4b7d977571d452d1afd6 (diff) | |
parent | d0e3e612ab308d8d5139370dedda54c0c28b9e50 (diff) | |
download | servo-01ec8491d3200d6710336da1bb0f4e01b49dc4bc.tar.gz servo-01ec8491d3200d6710336da1bb0f4e01b49dc4bc.zip |
Auto merge of #12374 - jdm:jsup, r=Manishearth
Improve performance of HTMLDivElement constructor
These changes address two sources of performance loss seen while profiling in #12354. #12358 and https://github.com/rust-lang/rust/issues/34727 are still the biggest offenders, however.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because we don't have performance tests and these are only optimizations
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12374)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmldivelement.rs')
-rw-r--r-- | components/script/dom/htmldivelement.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs index 585bc7e2e03..f3fcd6d8a3c 100644 --- a/components/script/dom/htmldivelement.rs +++ b/components/script/dom/htmldivelement.rs @@ -28,8 +28,9 @@ impl HTMLDivElement { pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDivElement> { - let element = HTMLDivElement::new_inherited(localName, prefix, document); - Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap) + Node::reflect_node(box HTMLDivElement::new_inherited(localName, prefix, document), + document, + HTMLDivElementBinding::Wrap) } } |