Closed Bug 1396700 Opened 7 years ago Closed 7 years ago

stylo: Minor clean up for ServoStyleSet

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files)

A placeholder bug for some patches in my queue.
Comment on attachment 8904402 [details]
Bug 1396700 - Remove ServoStyleSet::UpdateStyleSheet().

https://reviewboard.mozilla.org/r/176212/#review181150
Attachment #8904402 - Flags: review+
Comment on attachment 8904403 [details]
Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set.

https://reviewboard.mozilla.org/r/176214/#review181152
Attachment #8904403 - Flags: review+
Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1811ea2c78cc
Remove ServoStyleSet::UpdateStyleSheet(). r=xidorn
https://hg.mozilla.org/integration/autoland/rev/0a61f65ac5ed
Add a method to ServoStyleSet for creating XBL style set. r=xidorn
Comment on attachment 8904402 [details]
Bug 1396700 - Remove ServoStyleSet::UpdateStyleSheet().

https://reviewboard.mozilla.org/r/176212/#review181180

(Already landed, but looks good)
Attachment #8904402 - Flags: review?(emilio) → review+
Comment on attachment 8904403 [details]
Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set.

https://reviewboard.mozilla.org/r/176214/#review181184

::: layout/style/ServoStyleSet.cpp:131
(Diff revision 2)
> +  // which shouldn't be used for XBL styleset, so we clear it here to avoid
> +  // dangling pointer.
> +  set->mPresContext = nullptr;
> +
> +  return set;
> +}

Can we remove the ClearPresContext function now?
Attachment #8904403 - Flags: review?(emilio) → review+
Comment on attachment 8904403 [details]
Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set.

https://reviewboard.mozilla.org/r/176214/#review181184

> Can we remove the ClearPresContext function now?

Yes. `ClearPresContext` has been removed in this patch.
Comment on attachment 8904403 [details]
Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set.

https://reviewboard.mozilla.org/r/176214/#review181192

::: layout/style/ServoStyleSet.cpp:131
(Diff revision 2)
> +  // which shouldn't be used for XBL styleset, so we clear it here to avoid
> +  // dangling pointer.
> +  set->mPresContext = nullptr;
> +
> +  return set;
> +}

Whoops, missed that, thanks!
https://hg.mozilla.org/mozilla-central/rev/1811ea2c78cc
https://hg.mozilla.org/mozilla-central/rev/0a61f65ac5ed
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.