Skip to content

Commit

Permalink
Bug 1576703 - Update cbindgen. r=boris
Browse files Browse the repository at this point in the history
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:

  mozilla/cbindgen#377

It also caught some uninitialized value issues.

I think they're mostly harmless since we zero-initialize our structs:

https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632

And since we override the clip rect, which is the other bit of code that was
failing to build with this change.

Differential Revision: https://phabricator.services.mozilla.com/D43491

UltraBlame original commit: 6c3f50c6f6662291139bc292fb9dd77aa64331ee
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent dbbce85 commit 46a6545
Show file tree
Hide file tree
Showing 19 changed files with 110 additions and 237 deletions.
2 changes: 1 addition & 1 deletion build/moz.configure/bindgen.configure
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option(env='CBINDGEN', nargs=1, when=cbindgen_is_needed,
def check_cbindgen_version(cbindgen, fatal=False):
log.debug("trying cbindgen: %s" % cbindgen)

cbindgen_min_version = Version('0.9.0')
cbindgen_min_version = Version('0.9.1')

# cbindgen x.y.z
version = Version(check_cmd_output(cbindgen, '--version').strip().split(" ")[1])
Expand Down
2 changes: 1 addition & 1 deletion layout/style/FontFace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ Maybe<StyleComputedFontStretchRange> FontFace::GetFontStretch() const {
}

Maybe<StyleComputedFontStyleDescriptor> FontFace::GetFontStyle() const {
StyleComputedFontStyleDescriptor descriptor;
auto descriptor = StyleComputedFontStyleDescriptor::Normal();
if (!Servo_FontFaceRule_GetFontStyle(GetData(), &descriptor)) {
return Nothing();
}
Expand Down
2 changes: 1 addition & 1 deletion layout/style/FontFaceSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void FontFaceSet::ParseFontShorthandForMatching(
const nsAString& aFont, RefPtr<SharedFontList>& aFamilyList,
FontWeight& aWeight, FontStretch& aStretch, FontSlantStyle& aStyle,
ErrorResult& aRv) {
StyleComputedFontStyleDescriptor style;
auto style = StyleComputedFontStyleDescriptor::Normal();
float stretch;
float weight;

Expand Down
Loading

0 comments on commit 46a6545

Please sign in to comment.