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

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

Merged
merged 1 commit into from Jul 16, 2015

Conversation

@notriddle
Copy link
Contributor

notriddle commented Jul 15, 2015

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
Copy link

highfive commented Jul 15, 2015

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

hoppipolla-critic-bot commented Jul 15, 2015

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
Copy link
Member

jdm commented Jul 15, 2015

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

@jdm
Copy link
Member

jdm commented Jul 15, 2015

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 label Jul 15, 2015
@notriddle
Copy link
Contributor Author

notriddle commented Jul 15, 2015

It's squashed.

@jdm
Copy link
Member

jdm commented Jul 16, 2015

@bors-servo: r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2015

📌 Commit 602c8bb has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2015

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
Contributor

bors-servo commented Jul 16, 2015

💔 Test failed - mac3

@jdm
Copy link
Member

jdm commented Jul 16, 2015

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2015

Testing commit 602c8bb with merge 10f3a89...

bors-servo pushed a commit that referenced this pull request Jul 16, 2015
bors-servo
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
Contributor

bors-servo commented Jul 16, 2015

💔 Test failed - mac3

@jdm
Copy link
Member

jdm commented Jul 16, 2015

@jdm
Copy link
Member

jdm commented Jul 16, 2015

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2015

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

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2015

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

@bors-servo bors-servo merged commit 602c8bb into servo:master Jul 16, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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

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