Skip to content

Don't crash when Firefox doesn't send autoMargins. - #6637

Merged
bors-servo merged 1 commit into
servo:masterfrom
notriddle:master
Jul 16, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
notriddle:master

Conversation

@notriddle

Copy link
Copy Markdown
Contributor

Firefox Developer Tools doesn't always send autoMargins, as seen in this message:

{"type":"getLayout","node":"node14","to":"pageStyle9"}

So don't use unwrap.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 15, 2015
@highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @Ms2ger (or someone else) soon.

@hoppipolla-critic-bot

Copy link
Copy Markdown

Critic review: https://critic.hoppipolla.co.uk/r/5563

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 15, 2015
@jdm

jdm commented Jul 15, 2015

Copy link
Copy Markdown
Member

Thanks @notriddle! Be sure to check the output of ./mach test-tidy after making these changes, too!
-S-awaiting-review +S-needs-code-changes


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


components/devtools/actors/inspector.rs, line 462 [r1] (raw file):

let auto_margins = msg.get(&"autoMargins".to_string()).and_then(&Json::as_boolean)).unwrap_or(false);

We don't want to include any margin information if it's not requested.


Comments from the review on Reviewable.io

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 15, 2015
@jdm jdm removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 15, 2015
@jdm

jdm commented Jul 15, 2015

Copy link
Copy Markdown
Member

Looks great! Could you squash these three commits together, please?
-S-awaiting-review +S-needs-squash


Reviewed 1 of 1 files at r3.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@jdm jdm added the S-needs-squash Some (or all) of the commits in the PR should be combined. label Jul 15, 2015
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 15, 2015
@notriddle

Copy link
Copy Markdown
Contributor Author

It's squashed.

@jdm

jdm commented Jul 16, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
Thanks!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 602c8bb has been approved by jdm

@jdm jdm 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. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Jul 16, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 602c8bb with merge b9ac4bf...

bors-servo pushed a commit that referenced this pull request Jul 16, 2015
Don't crash when Firefox doesn't send autoMargins.

Firefox Developer Tools doesn't always send autoMargins, as seen in this message:

    {"type":"getLayout","node":"node14","to":"pageStyle9"}

So don't use unwrap.

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac3

@jdm

jdm commented Jul 16, 2015

Copy link
Copy Markdown
Member

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 602c8bb with merge 10f3a89...

bors-servo pushed a commit that referenced this pull request Jul 16, 2015
Don't crash when Firefox doesn't send autoMargins.

Firefox Developer Tools doesn't always send autoMargins, as seen in this message:

    {"type":"getLayout","node":"node14","to":"pageStyle9"}

So don't use unwrap.

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac3

@jdm

jdm commented Jul 16, 2015

Copy link
Copy Markdown
Member

@bors-servo: #6644

@jdm

jdm commented Jul 16, 2015

Copy link
Copy Markdown
Member

@bors-servo: retry

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux1, linux2, linux3, mac1, mac2 are reusable. Rebuilding only mac3...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux1, linux2, linux3, mac1, mac2, mac3

@bors-servo
bors-servo merged commit 602c8bb into servo:master Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants