Loading dom/bindings/Codegen.py +9 −1 Original line number Diff line number Diff line Loading @@ -6340,7 +6340,9 @@ def getJSToNativeConversionInfo( ctorArgs = "" # It's enough to set us to the right type; that will # create an empty array, which is all we need here. default = CGGeneric("%s.RawSetAs%s(%s);\n" % (value, name, ctorArgs)) default = CGGeneric( "Unused << %s.RawSetAs%s(%s);\n" % (value, name, ctorArgs) ) elif defaultValue.type.isEnum(): name = getUnionMemberName(defaultValue.type) # Make sure we actually construct the thing inside the nullable. Loading Loading @@ -12867,6 +12869,7 @@ class CGUnionStruct(CGThing): vars["ctorArgList"], bodyInHeader=not self.ownsMembers, body=body % "MOZ_ASSERT(mType == eUninitialized);", noDiscard=True, ) ) methods.append( Loading @@ -12876,6 +12879,7 @@ class CGUnionStruct(CGThing): vars["ctorArgList"], bodyInHeader=not self.ownsMembers, body=body % uninit, noDiscard=True, ) ) Loading Loading @@ -13295,6 +13299,7 @@ class ClassMethod(ClassItem): breakAfterSelf="\n", override=False, canRunScript=False, noDiscard=False, ): """ override indicates whether to flag the method as override Loading @@ -13314,10 +13319,13 @@ class ClassMethod(ClassItem): self.breakAfterSelf = breakAfterSelf self.override = override self.canRunScript = canRunScript self.noDiscard = noDiscard ClassItem.__init__(self, name, visibility) def getDecorators(self, declaring): decorators = [] if self.noDiscard: decorators.append("[[nodiscard]]") if self.canRunScript: decorators.append("MOZ_CAN_RUN_SCRIPT") if self.inline: Loading dom/crypto/WebCryptoTask.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ class WebCryptoTask : public CancelableRunnable { CryptoKey& aKey, const CryptoOperationData& aData) { CryptoOperationData dummy; dummy.SetAsArrayBuffer(aCx); Unused << dummy.SetAsArrayBuffer(aCx); return CreateSignVerifyTask(aCx, aAlgorithm, aKey, dummy, aData, true); } Loading dom/media/MediaManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2528,7 +2528,7 @@ static void ReduceConstraint( aConstraint.SetAsMediaTrackConstraints().mMediaSource.Construct( *mediaSource); } else { aConstraint.SetAsMediaTrackConstraints(); Unused << aConstraint.SetAsMediaTrackConstraints(); } } Loading dom/xml/XMLDocument.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ nsresult NS_NewDOMDocument(Document** aInstancePtrResult, if (!aQualifiedName.IsEmpty()) { ErrorResult result; ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> root = d->CreateElementNS(aNamespaceURI, aQualifiedName, options, result); Loading dom/xslt/xslt/txMozillaXSLTProcessor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -988,7 +988,7 @@ void txMozillaXSLTProcessor::notifyError() { IgnoredErrorResult rv; ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> element = document->CreateElementNS(ns, u"parsererror"_ns, options, rv); Loading @@ -1010,7 +1010,7 @@ void txMozillaXSLTProcessor::notifyError() { if (!mSourceText.IsEmpty()) { ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> sourceElement = document->CreateElementNS(ns, u"sourcetext"_ns, options, rv); Loading Loading
dom/bindings/Codegen.py +9 −1 Original line number Diff line number Diff line Loading @@ -6340,7 +6340,9 @@ def getJSToNativeConversionInfo( ctorArgs = "" # It's enough to set us to the right type; that will # create an empty array, which is all we need here. default = CGGeneric("%s.RawSetAs%s(%s);\n" % (value, name, ctorArgs)) default = CGGeneric( "Unused << %s.RawSetAs%s(%s);\n" % (value, name, ctorArgs) ) elif defaultValue.type.isEnum(): name = getUnionMemberName(defaultValue.type) # Make sure we actually construct the thing inside the nullable. Loading Loading @@ -12867,6 +12869,7 @@ class CGUnionStruct(CGThing): vars["ctorArgList"], bodyInHeader=not self.ownsMembers, body=body % "MOZ_ASSERT(mType == eUninitialized);", noDiscard=True, ) ) methods.append( Loading @@ -12876,6 +12879,7 @@ class CGUnionStruct(CGThing): vars["ctorArgList"], bodyInHeader=not self.ownsMembers, body=body % uninit, noDiscard=True, ) ) Loading Loading @@ -13295,6 +13299,7 @@ class ClassMethod(ClassItem): breakAfterSelf="\n", override=False, canRunScript=False, noDiscard=False, ): """ override indicates whether to flag the method as override Loading @@ -13314,10 +13319,13 @@ class ClassMethod(ClassItem): self.breakAfterSelf = breakAfterSelf self.override = override self.canRunScript = canRunScript self.noDiscard = noDiscard ClassItem.__init__(self, name, visibility) def getDecorators(self, declaring): decorators = [] if self.noDiscard: decorators.append("[[nodiscard]]") if self.canRunScript: decorators.append("MOZ_CAN_RUN_SCRIPT") if self.inline: Loading
dom/crypto/WebCryptoTask.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ class WebCryptoTask : public CancelableRunnable { CryptoKey& aKey, const CryptoOperationData& aData) { CryptoOperationData dummy; dummy.SetAsArrayBuffer(aCx); Unused << dummy.SetAsArrayBuffer(aCx); return CreateSignVerifyTask(aCx, aAlgorithm, aKey, dummy, aData, true); } Loading
dom/media/MediaManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2528,7 +2528,7 @@ static void ReduceConstraint( aConstraint.SetAsMediaTrackConstraints().mMediaSource.Construct( *mediaSource); } else { aConstraint.SetAsMediaTrackConstraints(); Unused << aConstraint.SetAsMediaTrackConstraints(); } } Loading
dom/xml/XMLDocument.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ nsresult NS_NewDOMDocument(Document** aInstancePtrResult, if (!aQualifiedName.IsEmpty()) { ErrorResult result; ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> root = d->CreateElementNS(aNamespaceURI, aQualifiedName, options, result); Loading
dom/xslt/xslt/txMozillaXSLTProcessor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -988,7 +988,7 @@ void txMozillaXSLTProcessor::notifyError() { IgnoredErrorResult rv; ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> element = document->CreateElementNS(ns, u"parsererror"_ns, options, rv); Loading @@ -1010,7 +1010,7 @@ void txMozillaXSLTProcessor::notifyError() { if (!mSourceText.IsEmpty()) { ElementCreationOptionsOrString options; options.SetAsString(); Unused << options.SetAsString(); nsCOMPtr<Element> sourceElement = document->CreateElementNS(ns, u"sourcetext"_ns, options, rv); Loading