mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958576 part 1. Create a binding_detail namespace and move AutoSequence to it. r=peterv
Note that we can't name this namespace "detail", because then we'd have both ::mozilla::detail and ::mozilla::dom::detail namespaces in the tree and various template name lookups that look for "detail::Foo" would get confused, and the code would not compile. C++ strikes again.
This commit is contained in:
parent
eb3ea30e19
commit
6d43e0116e
@ -2943,7 +2943,8 @@ CanvasRenderingContext2D::SetMozDashOffset(double mozDashOffset)
|
||||
}
|
||||
|
||||
void
|
||||
CanvasRenderingContext2D::SetLineDash(const mozilla::dom::AutoSequence<double>& aSegments) {
|
||||
CanvasRenderingContext2D::SetLineDash(const Sequence<double>& aSegments)
|
||||
{
|
||||
FallibleTArray<mozilla::gfx::Float>& dash = CurrentState().dash;
|
||||
dash.Clear();
|
||||
|
||||
|
@ -338,7 +338,7 @@ public:
|
||||
void SetMozDash(JSContext* cx, const JS::Value& mozDash,
|
||||
mozilla::ErrorResult& error);
|
||||
|
||||
void SetLineDash(const mozilla::dom::AutoSequence<double>& mSegments);
|
||||
void SetLineDash(const Sequence<double>& mSegments);
|
||||
void GetLineDash(nsTArray<double>& mSegments) const;
|
||||
|
||||
void SetLineDashOffset(double mOffset);
|
||||
|
@ -1597,6 +1597,8 @@ template<typename T>
|
||||
void DoTraceSequence(JSTracer* trc, InfallibleTArray<T>& seq);
|
||||
|
||||
// Class for simple sequence arguments, only used internally by codegen.
|
||||
namespace binding_detail {
|
||||
|
||||
template<typename T>
|
||||
class AutoSequence : public AutoFallibleTArray<T, 16>
|
||||
{
|
||||
@ -1610,6 +1612,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace binding_detail
|
||||
|
||||
// Class used to trace sequences, with specializations for various
|
||||
// sequence types.
|
||||
template<typename T,
|
||||
|
@ -3030,7 +3030,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
||||
if isMember or isOptional or nullable or isCallbackReturnValue:
|
||||
sequenceClass = "Sequence"
|
||||
else:
|
||||
sequenceClass = "AutoSequence"
|
||||
sequenceClass = "binding_detail::AutoSequence"
|
||||
|
||||
# XXXbz we can't include the index in the the sourceDescription, because
|
||||
# we don't really have a way to pass one in dynamically at runtime...
|
||||
@ -3832,7 +3832,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||
# Since we're not a member and not nullable or optional, no one will
|
||||
# see our real type, so we can do the fast version of the dictionary
|
||||
# that doesn't pre-initialize members.
|
||||
typeName = "dictionary_detail::Fast" + typeName
|
||||
typeName = "binding_detail::Fast" + typeName
|
||||
|
||||
declType = CGGeneric(typeName)
|
||||
|
||||
@ -4170,7 +4170,7 @@ class CGArgumentConverter(CGThing):
|
||||
raise TypeError("Shouldn't need holders for variadics")
|
||||
|
||||
replacer = dict(self.argcAndIndex, **self.replacementVariables)
|
||||
replacer["seqType"] = CGTemplatedType("AutoSequence",
|
||||
replacer["seqType"] = CGTemplatedType("binding_detail::AutoSequence",
|
||||
typeConversion.declType).define()
|
||||
if typeNeedsRooting(self.argument.type):
|
||||
rooterDecl = ("SequenceRooter<%s> ${holderName}(cx, &${declName});\n" %
|
||||
@ -9258,7 +9258,7 @@ if (""",
|
||||
isStruct=True)
|
||||
|
||||
return CGList([struct,
|
||||
CGNamespace.build(['dictionary_detail'],
|
||||
CGNamespace.build(['binding_detail'],
|
||||
fastStruct)],
|
||||
"\n")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user