Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce DOMClass::heap_size_of #7972

Merged
merged 1 commit into from Oct 15, 2015
Merged

Introduce DOMClass::heap_size_of #7972

merged 1 commit into from Oct 15, 2015

Conversation

@nox
Copy link
Member

nox commented Oct 11, 2015

It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.

Review on Reviewable

@highfive
Copy link

highfive commented Oct 11, 2015

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@Ms2ger
Copy link
Contributor

Ms2ger commented Oct 12, 2015

-S-awaiting-review +S-needs-code-changes


Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful.


components/script/dom/bindings/codegen/CodegenRust.py, line 1752 [r1] (raw file):
There's a better way than descriptor.prototypeChain[-1].


components/script/mem.rs, line 16 [r1] (raw file):
Would it make sense to pass a reflector here, to clarify that we're erasing the type?


components/script/mem.rs, line 23 [r1] (raw file):
Nit: backticks around HeapSizeOf.


components/script/mem.rs, line 28 [r1] (raw file):
where should be indented four spaces, and the following brace should go on the next line, not indented.


Comments from the review on Reviewable.io

@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2015

The latest upstream changes (presumably #7976) made this pull request unmergeable. Please resolve the merge conflicts.

@nox nox force-pushed the nox:codegen-heapsize branch from d6754b5 to f655b32 Oct 12, 2015
@nox
Copy link
Member Author

nox commented Oct 12, 2015

Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


components/script/mem.rs, line 16 [r1] (raw file):
I would rather we keep the HeapSizeOf bound, and for this we need to pass T. What do you think?


Comments from the review on Reviewable.io

@nox nox removed the S-needs-rebase label Oct 12, 2015
@nox nox force-pushed the nox:codegen-heapsize branch from f655b32 to b836103 Oct 12, 2015
@bors-servo
Copy link
Contributor

bors-servo commented Oct 14, 2015

The latest upstream changes (presumably #7873) made this pull request unmergeable. Please resolve the merge conflicts.

It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.
@nox nox force-pushed the nox:codegen-heapsize branch from b836103 to da67630 Oct 14, 2015
@nox nox added I-refactor and removed S-needs-rebase labels Oct 15, 2015
@Ms2ger
Copy link
Contributor

Ms2ger commented Oct 15, 2015

-S-awaiting-review +S-awaiting-merge
@bors-servo r+


Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


components/script/mem.rs, line 16 [r1] (raw file):
k.


Comments from the review on Reviewable.io

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2015

📌 Commit da67630 has been approved by Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2015

Testing commit da67630 with merge 5a0a91e...

bors-servo pushed a commit that referenced this pull request Oct 15, 2015
Introduce DOMClass::heap_size_of

It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7972)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2015

@bors-servo bors-servo merged commit da67630 into servo:master Oct 15, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@nox nox deleted the nox:codegen-heapsize branch Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.