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

Avoid entraining various Debug impls in release builds #19756

Merged
merged 1 commit into from Jan 13, 2018

Conversation

bholley
Copy link
Contributor

@bholley bholley commented Jan 13, 2018

See https://bugzilla.mozilla.org/show_bug.cgi?id=1351737#c29

This patch saves more than 80k of code size.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @canaltinova: components/style/properties/gecko.mako.rs, components/style/properties/helpers/animated_properties.mako.rs, components/style/properties/helpers.mako.rs, components/style/values/computed/font.rs, components/style/gecko_bindings/sugar/ns_css_value.rs and 3 more
  • @emilio: components/style/properties/gecko.mako.rs, ports/geckolib/glue.rs, components/style/properties/helpers/animated_properties.mako.rs, components/style/properties/helpers.mako.rs, components/style/values/computed/font.rs and 4 more

@highfive
Copy link

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 13, 2018
@bholley
Copy link
Contributor Author

bholley commented Jan 13, 2018

r? @emilio

@highfive highfive assigned emilio and unassigned jdm Jan 13, 2018
@@ -746,17 +746,10 @@ pub trait TElement
/// element-backed pseudo-element, in which case we return the originating
/// element.
fn rule_hash_target(&self) -> Self {
if let Some(pseudo) = self.implemented_pseudo_element() {
if let Some(_) = self.implemented_pseudo_element() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: is_some(). Though this was here to try figure out a crash with editor code and we never saw it in the wild.

@@ -746,17 +746,10 @@ pub trait TElement
/// element-backed pseudo-element, in which case we return the originating
/// element.
fn rule_hash_target(&self) -> Self {
if let Some(pseudo) = self.implemented_pseudo_element() {
if let Some(_) = self.implemented_pseudo_element() {
match self.closest_non_native_anonymous_ancestor() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this can use expect()

@bholley bholley force-pushed the avoid_debug_impls_in_release branch from d5c3afa to f858ce9 Compare January 13, 2018 17:52
@bholley
Copy link
Contributor Author

bholley commented Jan 13, 2018

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

📌 Commit f858ce9 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 13, 2018
@bors-servo
Copy link
Contributor

⌛ Testing commit f858ce9 with merge 08fc9f1...

bors-servo pushed a commit that referenced this pull request Jan 13, 2018
Avoid entraining various Debug impls in release builds

See https://bugzilla.mozilla.org/show_bug.cgi?id=1351737#c29

This patch saves more than 80k of code size.

<!-- 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/19756)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: emilio
Pushing 08fc9f1 to master...

@bors-servo bors-servo merged commit f858ce9 into servo:master Jan 13, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants