void-packages/srcpkgs/firefox/patches/mozilla-1386887.patch

90 lines
3.9 KiB
Diff

commit efbe3a9af876
Author: Manish Goregaokar <manishearth@gmail.com>
Date: Wed Aug 2 11:24:35 2017 -0700
Bug 1386887 - Clean up FFI lifetimes to work on nightly; r=emilio
MozReview-Commit-ID: 5WAIVd6p2du
---
layout/style/ServoBindingList.h | 4 ++--
layout/style/ServoBindingTypes.h | 2 ++
layout/style/ServoBindings.h | 4 ++--
layout/style/ServoBindings.toml | 4 +++-
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git layout/style/ServoBindingList.h layout/style/ServoBindingList.h
index 6c669ebb3d3e..87ade14ea4de 100644
--- layout/style/ServoBindingList.h
+++ layout/style/ServoBindingList.h
@@ -379,10 +379,10 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_HasCSSWideKeyword, bool,
nsCSSPropertyID property)
// Compose animation value for a given property.
// |base_values| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>.
-// We use void* to avoid exposing nsRefPtrHashtable in FFI.
+// We use RawServoAnimationValueTableBorrowed to avoid exposing nsRefPtrHashtable in FFI.
SERVO_BINDING_FUNC(Servo_AnimationCompose, void,
RawServoAnimationValueMapBorrowedMut animation_values,
- void* base_values,
+ RawServoAnimationValueTableBorrowed base_values,
nsCSSPropertyID property,
RawGeckoAnimationPropertySegmentBorrowed animation_segment,
RawGeckoAnimationPropertySegmentBorrowed last_segment,
diff --git layout/style/ServoBindingTypes.h layout/style/ServoBindingTypes.h
index aaf4fc27e1b9..69be15ee9f51 100644
--- layout/style/ServoBindingTypes.h
+++ layout/style/ServoBindingTypes.h
@@ -54,6 +54,8 @@ class nsXBLBinding;
using mozilla::dom::StyleChildrenIterator;
using mozilla::ServoElementSnapshot;
+typedef void* RawServoAnimationValueTableBorrowed;
+
typedef nsINode RawGeckoNode;
typedef mozilla::dom::Element RawGeckoElement;
typedef nsIDocument RawGeckoDocument;
diff --git layout/style/ServoBindings.h layout/style/ServoBindings.h
index 493ca63f932b..c6ced6d1fedb 100644
--- layout/style/ServoBindings.h
+++ layout/style/ServoBindings.h
@@ -268,9 +268,9 @@ double Gecko_GetPositionInSegment(
// Get servo's AnimationValue for |aProperty| from the cached base style
// |aBaseStyles|.
// |aBaseStyles| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>.
-// We use void* to avoid exposing nsRefPtrHashtable in FFI.
+// We use RawServoAnimationValueTableBorrowed to avoid exposing nsRefPtrHashtable in FFI.
RawServoAnimationValueBorrowedOrNull Gecko_AnimationGetBaseStyle(
- void* aBaseStyles,
+ RawServoAnimationValueTableBorrowed aBaseStyles,
nsCSSPropertyID aProperty);
void Gecko_StyleTransition_SetUnsupportedProperty(
mozilla::StyleTransition* aTransition,
diff --git layout/style/ServoBindings.toml layout/style/ServoBindings.toml
index 11e372541235..3c3902beea80 100644
--- layout/style/ServoBindings.toml
+++ layout/style/ServoBindings.toml
@@ -357,6 +357,7 @@ raw-lines = [
"pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues;",
"pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>;",
"pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData;",
+ "pub type RawServoAnimationValueTableBorrowed<'a> = &'a ();"
]
whitelist-functions = ["Servo_.*", "Gecko_.*"]
structs-types = [
@@ -389,7 +390,7 @@ structs-types = [
"RawGeckoPresContext",
"RawGeckoPresContextOwned",
"RawGeckoStyleAnimationList",
- "RawGeckoStyleChildrenIteratorBorrowedMut",
+ "RawGeckoStyleChildrenIterator",
"RawGeckoServoStyleRuleList",
"RawGeckoURLExtraData",
"RawGeckoXBLBinding",
@@ -526,6 +527,7 @@ servo-borrow-types = [
"RawGeckoFontFaceRuleList",
"RawGeckoServoStyleRuleList",
"RawGeckoServoAnimationValueList",
+ "RawGeckoStyleChildrenIterator",
]
fixups = [
# hack for gecko-owned string