author | Birunthan Mohanathas <birunthan@mohanathas.com> |
Mon, 02 Nov 2015 07:53:26 +0200 | |
changeset 270705 | 7ec70e0c699746cf72e03acadc09d0d5877423d0 |
parent 270704 | aa15cfe46e9cee89c0bca5a46c0d7ff4c0230f8b |
child 270706 | 499a2fece05b0fc622f3b328cfd8a606a61a99a7 |
push id | 29620 |
push user | cbook@mozilla.com |
push date | Mon, 02 Nov 2015 10:56:37 +0000 |
treeherder | mozilla-central@451a18579143 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1219392 |
milestone | 45.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/accessible/ipc/ProxyAccessible.cpp +++ b/accessible/ipc/ProxyAccessible.cpp @@ -75,63 +75,63 @@ ProxyAccessible::MustPruneChildren() con return mChildren[0]->Role() == roles::TEXT_LEAF || mChildren[0]->Role() == roles::STATICTEXT; } uint64_t ProxyAccessible::State() const { uint64_t state = 0; - unused << mDoc->SendState(mID, &state); + Unused << mDoc->SendState(mID, &state); return state; } uint64_t ProxyAccessible::NativeState() const { uint64_t state = 0; - unused << mDoc->SendNativeState(mID, &state); + Unused << mDoc->SendNativeState(mID, &state); return state; } void ProxyAccessible::Name(nsString& aName) const { - unused << mDoc->SendName(mID, &aName); + Unused << mDoc->SendName(mID, &aName); } void ProxyAccessible::Value(nsString& aValue) const { - unused << mDoc->SendValue(mID, &aValue); + Unused << mDoc->SendValue(mID, &aValue); } void ProxyAccessible::Help(nsString& aHelp) const { - unused << mDoc->SendHelp(mID, &aHelp); + Unused << mDoc->SendHelp(mID, &aHelp); } void ProxyAccessible::Description(nsString& aDesc) const { - unused << mDoc->SendDescription(mID, &aDesc); + Unused << mDoc->SendDescription(mID, &aDesc); } void ProxyAccessible::Attributes(nsTArray<Attribute> *aAttrs) const { - unused << mDoc->SendAttributes(mID, aAttrs); + Unused << mDoc->SendAttributes(mID, aAttrs); } nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(RelationType aType) const { nsTArray<uint64_t> targetIDs; - unused << mDoc->SendRelationByType(mID, static_cast<uint32_t>(aType), + Unused << mDoc->SendRelationByType(mID, static_cast<uint32_t>(aType), &targetIDs); size_t targetCount = targetIDs.Length(); nsTArray<ProxyAccessible*> targets(targetCount); for (size_t i = 0; i < targetCount; i++) if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i])) targets.AppendElement(proxy); @@ -139,17 +139,17 @@ ProxyAccessible::RelationByType(Relation } void ProxyAccessible::Relations(nsTArray<RelationType>* aTypes, nsTArray<nsTArray<ProxyAccessible*>>* aTargetSets) const { nsTArray<RelationTargets> ipcRelations; - unused << mDoc->SendRelations(mID, &ipcRelations); + Unused << mDoc->SendRelations(mID, &ipcRelations); size_t relationCount = ipcRelations.Length(); aTypes->SetCapacity(relationCount); aTargetSets->SetCapacity(relationCount); for (size_t i = 0; i < relationCount; i++) { uint32_t type = ipcRelations[i].Type(); if (type > static_cast<uint32_t>(RelationType::LAST)) continue; @@ -167,977 +167,977 @@ ProxyAccessible::Relations(nsTArray<Rela aTypes->AppendElement(static_cast<RelationType>(type)); } } bool ProxyAccessible::IsSearchbox() const { bool retVal = false; - unused << mDoc->SendIsSearchbox(mID, &retVal); + Unused << mDoc->SendIsSearchbox(mID, &retVal); return retVal; } nsIAtom* ProxyAccessible::LandmarkRole() const { nsString landmark; - unused << mDoc->SendLandmarkRole(mID, &landmark); + Unused << mDoc->SendLandmarkRole(mID, &landmark); return NS_GetStaticAtom(landmark); } nsIAtom* ProxyAccessible::ARIARoleAtom() const { nsString role; - unused << mDoc->SendARIARoleAtom(mID, &role); + Unused << mDoc->SendARIARoleAtom(mID, &role); return NS_GetStaticAtom(role); } int32_t ProxyAccessible::GetLevelInternal() { int32_t level = 0; - unused << mDoc->SendGetLevelInternal(mID, &level); + Unused << mDoc->SendGetLevelInternal(mID, &level); return level; } int32_t ProxyAccessible::CaretLineNumber() { int32_t line = -1; - unused << mDoc->SendCaretOffset(mID, &line); + Unused << mDoc->SendCaretOffset(mID, &line); return line; } int32_t ProxyAccessible::CaretOffset() { int32_t offset = 0; - unused << mDoc->SendCaretOffset(mID, &offset); + Unused << mDoc->SendCaretOffset(mID, &offset); return offset; } void ProxyAccessible::SetCaretOffset(int32_t aOffset) { - unused << mDoc->SendSetCaretOffset(mID, aOffset); + Unused << mDoc->SendSetCaretOffset(mID, aOffset); } int32_t ProxyAccessible::CharacterCount() { int32_t count = 0; - unused << mDoc->SendCharacterCount(mID, &count); + Unused << mDoc->SendCharacterCount(mID, &count); return count; } int32_t ProxyAccessible::SelectionCount() { int32_t count = 0; - unused << mDoc->SendSelectionCount(mID, &count); + Unused << mDoc->SendSelectionCount(mID, &count); return count; } bool ProxyAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOfset, nsString& aText) const { bool valid; - unused << mDoc->SendTextSubstring(mID, aStartOffset, aEndOfset, &aText, &valid); + Unused << mDoc->SendTextSubstring(mID, aStartOffset, aEndOfset, &aText, &valid); return valid; } void ProxyAccessible::GetTextAfterOffset(int32_t aOffset, AccessibleTextBoundary aBoundaryType, nsString& aText, int32_t* aStartOffset, int32_t* aEndOffset) { - unused << mDoc->SendGetTextAfterOffset(mID, aOffset, aBoundaryType, + Unused << mDoc->SendGetTextAfterOffset(mID, aOffset, aBoundaryType, &aText, aStartOffset, aEndOffset); } void ProxyAccessible::GetTextAtOffset(int32_t aOffset, AccessibleTextBoundary aBoundaryType, nsString& aText, int32_t* aStartOffset, int32_t* aEndOffset) { - unused << mDoc->SendGetTextAtOffset(mID, aOffset, aBoundaryType, + Unused << mDoc->SendGetTextAtOffset(mID, aOffset, aBoundaryType, &aText, aStartOffset, aEndOffset); } void ProxyAccessible::GetTextBeforeOffset(int32_t aOffset, AccessibleTextBoundary aBoundaryType, nsString& aText, int32_t* aStartOffset, int32_t* aEndOffset) { - unused << mDoc->SendGetTextBeforeOffset(mID, aOffset, aBoundaryType, + Unused << mDoc->SendGetTextBeforeOffset(mID, aOffset, aBoundaryType, &aText, aStartOffset, aEndOffset); } char16_t ProxyAccessible::CharAt(int32_t aOffset) { uint16_t retval = 0; - unused << mDoc->SendCharAt(mID, aOffset, &retval); + Unused << mDoc->SendCharAt(mID, aOffset, &retval); return static_cast<char16_t>(retval); } void ProxyAccessible::TextAttributes(bool aIncludeDefAttrs, int32_t aOffset, nsTArray<Attribute>* aAttributes, int32_t* aStartOffset, int32_t* aEndOffset) { - unused << mDoc->SendTextAttributes(mID, aIncludeDefAttrs, aOffset, + Unused << mDoc->SendTextAttributes(mID, aIncludeDefAttrs, aOffset, aAttributes, aStartOffset, aEndOffset); } void ProxyAccessible::DefaultTextAttributes(nsTArray<Attribute>* aAttrs) { - unused << mDoc->SendDefaultTextAttributes(mID, aAttrs); + Unused << mDoc->SendDefaultTextAttributes(mID, aAttrs); } nsIntRect ProxyAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset, uint32_t aCoordType) { nsIntRect rect; - unused << + Unused << mDoc->SendTextBounds(mID, aStartOffset, aEndOffset, aCoordType, &rect); return rect; } nsIntRect ProxyAccessible::CharBounds(int32_t aOffset, uint32_t aCoordType) { nsIntRect rect; - unused << + Unused << mDoc->SendCharBounds(mID, aOffset, aCoordType, &rect); return rect; } int32_t ProxyAccessible::OffsetAtPoint(int32_t aX, int32_t aY, uint32_t aCoordType) { int32_t retVal = -1; - unused << mDoc->SendOffsetAtPoint(mID, aX, aY, aCoordType, &retVal); + Unused << mDoc->SendOffsetAtPoint(mID, aX, aY, aCoordType, &retVal); return retVal; } bool ProxyAccessible::SelectionBoundsAt(int32_t aSelectionNum, nsString& aData, int32_t* aStartOffset, int32_t* aEndOffset) { bool retVal = false; - unused << mDoc->SendSelectionBoundsAt(mID, aSelectionNum, &retVal, &aData, + Unused << mDoc->SendSelectionBoundsAt(mID, aSelectionNum, &retVal, &aData, aStartOffset, aEndOffset); return retVal; } bool ProxyAccessible::SetSelectionBoundsAt(int32_t aSelectionNum, int32_t aStartOffset, int32_t aEndOffset) { bool retVal = false; - unused << mDoc->SendSetSelectionBoundsAt(mID, aSelectionNum, aStartOffset, + Unused << mDoc->SendSetSelectionBoundsAt(mID, aSelectionNum, aStartOffset, aEndOffset, &retVal); return retVal; } bool ProxyAccessible::AddToSelection(int32_t aStartOffset, int32_t aEndOffset) { bool retVal = false; - unused << mDoc->SendAddToSelection(mID, aStartOffset, aEndOffset, &retVal); + Unused << mDoc->SendAddToSelection(mID, aStartOffset, aEndOffset, &retVal); return retVal; } bool ProxyAccessible::RemoveFromSelection(int32_t aSelectionNum) { bool retVal = false; - unused << mDoc->SendRemoveFromSelection(mID, aSelectionNum, &retVal); + Unused << mDoc->SendRemoveFromSelection(mID, aSelectionNum, &retVal); return retVal; } void ProxyAccessible::ScrollSubstringTo(int32_t aStartOffset, int32_t aEndOffset, uint32_t aScrollType) { - unused << mDoc->SendScrollSubstringTo(mID, aStartOffset, aEndOffset, aScrollType); + Unused << mDoc->SendScrollSubstringTo(mID, aStartOffset, aEndOffset, aScrollType); } void ProxyAccessible::ScrollSubstringToPoint(int32_t aStartOffset, int32_t aEndOffset, uint32_t aCoordinateType, int32_t aX, int32_t aY) { - unused << mDoc->SendScrollSubstringToPoint(mID, aStartOffset, aEndOffset, + Unused << mDoc->SendScrollSubstringToPoint(mID, aStartOffset, aEndOffset, aCoordinateType, aX, aY); } void ProxyAccessible::Text(nsString* aText) { - unused << mDoc->SendText(mID, aText); + Unused << mDoc->SendText(mID, aText); } void ProxyAccessible::ReplaceText(const nsString& aText) { - unused << mDoc->SendReplaceText(mID, aText); + Unused << mDoc->SendReplaceText(mID, aText); } bool ProxyAccessible::InsertText(const nsString& aText, int32_t aPosition) { bool valid; - unused << mDoc->SendInsertText(mID, aText, aPosition, &valid); + Unused << mDoc->SendInsertText(mID, aText, aPosition, &valid); return valid; } bool ProxyAccessible::CopyText(int32_t aStartPos, int32_t aEndPos) { bool valid; - unused << mDoc->SendCopyText(mID, aStartPos, aEndPos, &valid); + Unused << mDoc->SendCopyText(mID, aStartPos, aEndPos, &valid); return valid; } bool ProxyAccessible::CutText(int32_t aStartPos, int32_t aEndPos) { bool valid; - unused << mDoc->SendCutText(mID, aStartPos, aEndPos, &valid); + Unused << mDoc->SendCutText(mID, aStartPos, aEndPos, &valid); return valid; } bool ProxyAccessible::DeleteText(int32_t aStartPos, int32_t aEndPos) { bool valid; - unused << mDoc->SendDeleteText(mID, aStartPos, aEndPos, &valid); + Unused << mDoc->SendDeleteText(mID, aStartPos, aEndPos, &valid); return valid; } bool ProxyAccessible::PasteText(int32_t aPosition) { bool valid; - unused << mDoc->SendPasteText(mID, aPosition, &valid); + Unused << mDoc->SendPasteText(mID, aPosition, &valid); return valid; } nsIntPoint ProxyAccessible::ImagePosition(uint32_t aCoordType) { nsIntPoint retVal; - unused << mDoc->SendImagePosition(mID, aCoordType, &retVal); + Unused << mDoc->SendImagePosition(mID, aCoordType, &retVal); return retVal; } nsIntSize ProxyAccessible::ImageSize() { nsIntSize retVal; - unused << mDoc->SendImageSize(mID, &retVal); + Unused << mDoc->SendImageSize(mID, &retVal); return retVal; } uint32_t ProxyAccessible::StartOffset(bool* aOk) { uint32_t retVal = 0; - unused << mDoc->SendStartOffset(mID, &retVal, aOk); + Unused << mDoc->SendStartOffset(mID, &retVal, aOk); return retVal; } uint32_t ProxyAccessible::EndOffset(bool* aOk) { uint32_t retVal = 0; - unused << mDoc->SendEndOffset(mID, &retVal, aOk); + Unused << mDoc->SendEndOffset(mID, &retVal, aOk); return retVal; } bool ProxyAccessible::IsLinkValid() { bool retVal = false; - unused << mDoc->SendIsLinkValid(mID, &retVal); + Unused << mDoc->SendIsLinkValid(mID, &retVal); return retVal; } uint32_t ProxyAccessible::AnchorCount(bool* aOk) { uint32_t retVal = 0; - unused << mDoc->SendAnchorCount(mID, &retVal, aOk); + Unused << mDoc->SendAnchorCount(mID, &retVal, aOk); return retVal; } void ProxyAccessible::AnchorURIAt(uint32_t aIndex, nsCString& aURI, bool* aOk) { - unused << mDoc->SendAnchorURIAt(mID, aIndex, &aURI, aOk); + Unused << mDoc->SendAnchorURIAt(mID, aIndex, &aURI, aOk); } ProxyAccessible* ProxyAccessible::AnchorAt(uint32_t aIndex) { uint64_t id = 0; bool ok = false; - unused << mDoc->SendAnchorAt(mID, aIndex, &id, &ok); + Unused << mDoc->SendAnchorAt(mID, aIndex, &id, &ok); return ok ? mDoc->GetAccessible(id) : nullptr; } uint32_t ProxyAccessible::LinkCount() { uint32_t retVal = 0; - unused << mDoc->SendLinkCount(mID, &retVal); + Unused << mDoc->SendLinkCount(mID, &retVal); return retVal; } ProxyAccessible* ProxyAccessible::LinkAt(const uint32_t& aIndex) { uint64_t linkID = 0; bool ok = false; - unused << mDoc->SendLinkAt(mID, aIndex, &linkID, &ok); + Unused << mDoc->SendLinkAt(mID, aIndex, &linkID, &ok); return ok ? mDoc->GetAccessible(linkID) : nullptr; } int32_t ProxyAccessible::LinkIndexOf(ProxyAccessible* aLink) { int32_t retVal = -1; if (aLink) { - unused << mDoc->SendLinkIndexOf(mID, aLink->ID(), &retVal); + Unused << mDoc->SendLinkIndexOf(mID, aLink->ID(), &retVal); } return retVal; } int32_t ProxyAccessible::LinkIndexAtOffset(uint32_t aOffset) { int32_t retVal = -1; - unused << mDoc->SendLinkIndexAtOffset(mID, aOffset, &retVal); + Unused << mDoc->SendLinkIndexAtOffset(mID, aOffset, &retVal); return retVal; } ProxyAccessible* ProxyAccessible::TableOfACell() { uint64_t tableID = 0; bool ok = false; - unused << mDoc->SendTableOfACell(mID, &tableID, &ok); + Unused << mDoc->SendTableOfACell(mID, &tableID, &ok); return ok ? mDoc->GetAccessible(tableID) : nullptr; } uint32_t ProxyAccessible::ColIdx() { uint32_t index = 0; - unused << mDoc->SendColIdx(mID, &index); + Unused << mDoc->SendColIdx(mID, &index); return index; } uint32_t ProxyAccessible::RowIdx() { uint32_t index = 0; - unused << mDoc->SendRowIdx(mID, &index); + Unused << mDoc->SendRowIdx(mID, &index); return index; } uint32_t ProxyAccessible::ColExtent() { uint32_t extent = 0; - unused << mDoc->SendColExtent(mID, &extent); + Unused << mDoc->SendColExtent(mID, &extent); return extent; } uint32_t ProxyAccessible::RowExtent() { uint32_t extent = 0; - unused << mDoc->SendRowExtent(mID, &extent); + Unused << mDoc->SendRowExtent(mID, &extent); return extent; } void ProxyAccessible::ColHeaderCells(nsTArray<ProxyAccessible*>* aCells) { nsTArray<uint64_t> targetIDs; - unused << mDoc->SendColHeaderCells(mID, &targetIDs); + Unused << mDoc->SendColHeaderCells(mID, &targetIDs); size_t targetCount = targetIDs.Length(); for (size_t i = 0; i < targetCount; i++) { aCells->AppendElement(mDoc->GetAccessible(targetIDs[i])); } } void ProxyAccessible::RowHeaderCells(nsTArray<ProxyAccessible*>* aCells) { nsTArray<uint64_t> targetIDs; - unused << mDoc->SendRowHeaderCells(mID, &targetIDs); + Unused << mDoc->SendRowHeaderCells(mID, &targetIDs); size_t targetCount = targetIDs.Length(); for (size_t i = 0; i < targetCount; i++) { aCells->AppendElement(mDoc->GetAccessible(targetIDs[i])); } } bool ProxyAccessible::IsCellSelected() { bool selected = false; - unused << mDoc->SendIsCellSelected(mID, &selected); + Unused << mDoc->SendIsCellSelected(mID, &selected); return selected; } ProxyAccessible* ProxyAccessible::TableCaption() { uint64_t captionID = 0; bool ok = false; - unused << mDoc->SendTableCaption(mID, &captionID, &ok); + Unused << mDoc->SendTableCaption(mID, &captionID, &ok); return ok ? mDoc->GetAccessible(captionID) : nullptr; } void ProxyAccessible::TableSummary(nsString& aSummary) { - unused << mDoc->SendTableSummary(mID, &aSummary); + Unused << mDoc->SendTableSummary(mID, &aSummary); } uint32_t ProxyAccessible::TableColumnCount() { uint32_t count = 0; - unused << mDoc->SendTableColumnCount(mID, &count); + Unused << mDoc->SendTableColumnCount(mID, &count); return count; } uint32_t ProxyAccessible::TableRowCount() { uint32_t count = 0; - unused << mDoc->SendTableRowCount(mID, &count); + Unused << mDoc->SendTableRowCount(mID, &count); return count; } ProxyAccessible* ProxyAccessible::TableCellAt(uint32_t aRow, uint32_t aCol) { uint64_t cellID = 0; bool ok = false; - unused << mDoc->SendTableCellAt(mID, aRow, aCol, &cellID, &ok); + Unused << mDoc->SendTableCellAt(mID, aRow, aCol, &cellID, &ok); return ok ? mDoc->GetAccessible(cellID) : nullptr; } int32_t ProxyAccessible::TableCellIndexAt(uint32_t aRow, uint32_t aCol) { int32_t index = 0; - unused << mDoc->SendTableCellIndexAt(mID, aRow, aCol, &index); + Unused << mDoc->SendTableCellIndexAt(mID, aRow, aCol, &index); return index; } int32_t ProxyAccessible::TableColumnIndexAt(uint32_t aCellIndex) { int32_t index = 0; - unused << mDoc->SendTableColumnIndexAt(mID, aCellIndex, &index); + Unused << mDoc->SendTableColumnIndexAt(mID, aCellIndex, &index); return index; } int32_t ProxyAccessible::TableRowIndexAt(uint32_t aCellIndex) { int32_t index = 0; - unused << mDoc->SendTableRowIndexAt(mID, aCellIndex, &index); + Unused << mDoc->SendTableRowIndexAt(mID, aCellIndex, &index); return index; } void ProxyAccessible::TableRowAndColumnIndicesAt(uint32_t aCellIndex, int32_t* aRow, int32_t* aCol) { - unused << mDoc->SendTableRowAndColumnIndicesAt(mID, aCellIndex, aRow, aCol); + Unused << mDoc->SendTableRowAndColumnIndicesAt(mID, aCellIndex, aRow, aCol); } uint32_t ProxyAccessible::TableColumnExtentAt(uint32_t aRow, uint32_t aCol) { uint32_t extent = 0; - unused << mDoc->SendTableColumnExtentAt(mID, aRow, aCol, &extent); + Unused << mDoc->SendTableColumnExtentAt(mID, aRow, aCol, &extent); return extent; } uint32_t ProxyAccessible::TableRowExtentAt(uint32_t aRow, uint32_t aCol) { uint32_t extent = 0; - unused << mDoc->SendTableRowExtentAt(mID, aRow, aCol, &extent); + Unused << mDoc->SendTableRowExtentAt(mID, aRow, aCol, &extent); return extent; } void ProxyAccessible::TableColumnDescription(uint32_t aCol, nsString& aDescription) { - unused << mDoc->SendTableColumnDescription(mID, aCol, &aDescription); + Unused << mDoc->SendTableColumnDescription(mID, aCol, &aDescription); } void ProxyAccessible::TableRowDescription(uint32_t aRow, nsString& aDescription) { - unused << mDoc->SendTableRowDescription(mID, aRow, &aDescription); + Unused << mDoc->SendTableRowDescription(mID, aRow, &aDescription); } bool ProxyAccessible::TableColumnSelected(uint32_t aCol) { bool selected = false; - unused << mDoc->SendTableColumnSelected(mID, aCol, &selected); + Unused << mDoc->SendTableColumnSelected(mID, aCol, &selected); return selected; } bool ProxyAccessible::TableRowSelected(uint32_t aRow) { bool selected = false; - unused << mDoc->SendTableRowSelected(mID, aRow, &selected); + Unused << mDoc->SendTableRowSelected(mID, aRow, &selected); return selected; } bool ProxyAccessible::TableCellSelected(uint32_t aRow, uint32_t aCol) { bool selected = false; - unused << mDoc->SendTableCellSelected(mID, aRow, aCol, &selected); + Unused << mDoc->SendTableCellSelected(mID, aRow, aCol, &selected); return selected; } uint32_t ProxyAccessible::TableSelectedCellCount() { uint32_t count = 0; - unused << mDoc->SendTableSelectedCellCount(mID, &count); + Unused << mDoc->SendTableSelectedCellCount(mID, &count); return count; } uint32_t ProxyAccessible::TableSelectedColumnCount() { uint32_t count = 0; - unused << mDoc->SendTableSelectedColumnCount(mID, &count); + Unused << mDoc->SendTableSelectedColumnCount(mID, &count); return count; } uint32_t ProxyAccessible::TableSelectedRowCount() { uint32_t count = 0; - unused << mDoc->SendTableSelectedRowCount(mID, &count); + Unused << mDoc->SendTableSelectedRowCount(mID, &count); return count; } void ProxyAccessible::TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs) { nsAutoTArray<uint64_t, 30> cellIDs; - unused << mDoc->SendTableSelectedCells(mID, &cellIDs); + Unused << mDoc->SendTableSelectedCells(mID, &cellIDs); aCellIDs->SetCapacity(cellIDs.Length()); for (uint32_t i = 0; i < cellIDs.Length(); ++i) { aCellIDs->AppendElement(mDoc->GetAccessible(cellIDs[i])); } } void ProxyAccessible::TableSelectedCellIndices(nsTArray<uint32_t>* aCellIndices) { - unused << mDoc->SendTableSelectedCellIndices(mID, aCellIndices); + Unused << mDoc->SendTableSelectedCellIndices(mID, aCellIndices); } void ProxyAccessible::TableSelectedColumnIndices(nsTArray<uint32_t>* aColumnIndices) { - unused << mDoc->SendTableSelectedColumnIndices(mID, aColumnIndices); + Unused << mDoc->SendTableSelectedColumnIndices(mID, aColumnIndices); } void ProxyAccessible::TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices) { - unused << mDoc->SendTableSelectedRowIndices(mID, aRowIndices); + Unused << mDoc->SendTableSelectedRowIndices(mID, aRowIndices); } void ProxyAccessible::TableSelectColumn(uint32_t aCol) { - unused << mDoc->SendTableSelectColumn(mID, aCol); + Unused << mDoc->SendTableSelectColumn(mID, aCol); } void ProxyAccessible::TableSelectRow(uint32_t aRow) { - unused << mDoc->SendTableSelectRow(mID, aRow); + Unused << mDoc->SendTableSelectRow(mID, aRow); } void ProxyAccessible::TableUnselectColumn(uint32_t aCol) { - unused << mDoc->SendTableUnselectColumn(mID, aCol); + Unused << mDoc->SendTableUnselectColumn(mID, aCol); } void ProxyAccessible::TableUnselectRow(uint32_t aRow) { - unused << mDoc->SendTableUnselectRow(mID, aRow); + Unused << mDoc->SendTableUnselectRow(mID, aRow); } bool ProxyAccessible::TableIsProbablyForLayout() { bool forLayout = false; - unused << mDoc->SendTableIsProbablyForLayout(mID, &forLayout); + Unused << mDoc->SendTableIsProbablyForLayout(mID, &forLayout); return forLayout; } ProxyAccessible* ProxyAccessible::AtkTableColumnHeader(int32_t aCol) { uint64_t headerID = 0; bool ok = false; - unused << mDoc->SendAtkTableColumnHeader(mID, aCol, &headerID, &ok); + Unused << mDoc->SendAtkTableColumnHeader(mID, aCol, &headerID, &ok); return ok ? mDoc->GetAccessible(headerID) : nullptr; } ProxyAccessible* ProxyAccessible::AtkTableRowHeader(int32_t aRow) { uint64_t headerID = 0; bool ok = false; - unused << mDoc->SendAtkTableRowHeader(mID, aRow, &headerID, &ok); + Unused << mDoc->SendAtkTableRowHeader(mID, aRow, &headerID, &ok); return ok ? mDoc->GetAccessible(headerID) : nullptr; } void ProxyAccessible::SelectedItems(nsTArray<ProxyAccessible*>* aSelectedItems) { nsAutoTArray<uint64_t, 10> itemIDs; - unused << mDoc->SendSelectedItems(mID, &itemIDs); + Unused << mDoc->SendSelectedItems(mID, &itemIDs); aSelectedItems->SetCapacity(itemIDs.Length()); for (size_t i = 0; i < itemIDs.Length(); ++i) { aSelectedItems->AppendElement(mDoc->GetAccessible(itemIDs[i])); } } uint32_t ProxyAccessible::SelectedItemCount() { uint32_t count = 0; - unused << mDoc->SendSelectedItemCount(mID, &count); + Unused << mDoc->SendSelectedItemCount(mID, &count); return count; } ProxyAccessible* ProxyAccessible::GetSelectedItem(uint32_t aIndex) { uint64_t selectedItemID = 0; bool ok = false; - unused << mDoc->SendGetSelectedItem(mID, aIndex, &selectedItemID, &ok); + Unused << mDoc->SendGetSelectedItem(mID, aIndex, &selectedItemID, &ok); return ok ? mDoc->GetAccessible(selectedItemID) : nullptr; } bool ProxyAccessible::IsItemSelected(uint32_t aIndex) { bool selected = false; - unused << mDoc->SendIsItemSelected(mID, aIndex, &selected); + Unused << mDoc->SendIsItemSelected(mID, aIndex, &selected); return selected; } bool ProxyAccessible::AddItemToSelection(uint32_t aIndex) { bool success = false; - unused << mDoc->SendAddItemToSelection(mID, aIndex, &success); + Unused << mDoc->SendAddItemToSelection(mID, aIndex, &success); return success; } bool ProxyAccessible::RemoveItemFromSelection(uint32_t aIndex) { bool success = false; - unused << mDoc->SendRemoveItemFromSelection(mID, aIndex, &success); + Unused << mDoc->SendRemoveItemFromSelection(mID, aIndex, &success); return success; } bool ProxyAccessible::SelectAll() { bool success = false; - unused << mDoc->SendSelectAll(mID, &success); + Unused << mDoc->SendSelectAll(mID, &success); return success; } bool ProxyAccessible::UnselectAll() { bool success = false; - unused << mDoc->SendUnselectAll(mID, &success); + Unused << mDoc->SendUnselectAll(mID, &success); return success; } void ProxyAccessible::TakeSelection() { - unused << mDoc->SendTakeSelection(mID); + Unused << mDoc->SendTakeSelection(mID); } void ProxyAccessible::SetSelected(bool aSelect) { - unused << mDoc->SendSetSelected(mID, aSelect); + Unused << mDoc->SendSetSelected(mID, aSelect); } bool ProxyAccessible::DoAction(uint8_t aIndex) { bool success = false; - unused << mDoc->SendDoAction(mID, aIndex, &success); + Unused << mDoc->SendDoAction(mID, aIndex, &success); return success; } uint8_t ProxyAccessible::ActionCount() { uint8_t count = 0; - unused << mDoc->SendActionCount(mID, &count); + Unused << mDoc->SendActionCount(mID, &count); return count; } void ProxyAccessible::ActionDescriptionAt(uint8_t aIndex, nsString& aDescription) { - unused << mDoc->SendActionDescriptionAt(mID, aIndex, &aDescription); + Unused << mDoc->SendActionDescriptionAt(mID, aIndex, &aDescription); } void ProxyAccessible::ActionNameAt(uint8_t aIndex, nsString& aName) { - unused << mDoc->SendActionNameAt(mID, aIndex, &aName); + Unused << mDoc->SendActionNameAt(mID, aIndex, &aName); } KeyBinding ProxyAccessible::AccessKey() { uint32_t key = 0; uint32_t modifierMask = 0; - unused << mDoc->SendAccessKey(mID, &key, &modifierMask); + Unused << mDoc->SendAccessKey(mID, &key, &modifierMask); return KeyBinding(key, modifierMask); } KeyBinding ProxyAccessible::KeyboardShortcut() { uint32_t key = 0; uint32_t modifierMask = 0; - unused << mDoc->SendKeyboardShortcut(mID, &key, &modifierMask); + Unused << mDoc->SendKeyboardShortcut(mID, &key, &modifierMask); return KeyBinding(key, modifierMask); } void ProxyAccessible::AtkKeyBinding(nsString& aBinding) { - unused << mDoc->SendAtkKeyBinding(mID, &aBinding); + Unused << mDoc->SendAtkKeyBinding(mID, &aBinding); } double ProxyAccessible::CurValue() { double val = UnspecifiedNaN<double>(); - unused << mDoc->SendCurValue(mID, &val); + Unused << mDoc->SendCurValue(mID, &val); return val; } bool ProxyAccessible::SetCurValue(double aValue) { bool success = false; - unused << mDoc->SendSetCurValue(mID, aValue, &success); + Unused << mDoc->SendSetCurValue(mID, aValue, &success); return success; } double ProxyAccessible::MinValue() { double val = UnspecifiedNaN<double>(); - unused << mDoc->SendMinValue(mID, &val); + Unused << mDoc->SendMinValue(mID, &val); return val; } double ProxyAccessible::MaxValue() { double val = UnspecifiedNaN<double>(); - unused << mDoc->SendMaxValue(mID, &val); + Unused << mDoc->SendMaxValue(mID, &val); return val; } double ProxyAccessible::Step() { double step = UnspecifiedNaN<double>(); - unused << mDoc->SendStep(mID, &step); + Unused << mDoc->SendStep(mID, &step); return step; } void ProxyAccessible::TakeFocus() { - unused << mDoc->SendTakeFocus(mID); + Unused << mDoc->SendTakeFocus(mID); } uint32_t ProxyAccessible::EmbeddedChildCount() const { uint32_t count; - unused << mDoc->SendEmbeddedChildCount(mID, &count); + Unused << mDoc->SendEmbeddedChildCount(mID, &count); return count; } int32_t ProxyAccessible::IndexOfEmbeddedChild(const ProxyAccessible* aChild) { uint64_t childID = aChild->mID; uint32_t childIdx; - unused << mDoc->SendIndexOfEmbeddedChild(mID, childID, &childIdx); + Unused << mDoc->SendIndexOfEmbeddedChild(mID, childID, &childIdx); return childIdx; } ProxyAccessible* ProxyAccessible::EmbeddedChildAt(size_t aChildIdx) { // For an outer doc the only child is a document, which is of course an // embedded child. Further asking the child process for the id of the child // document won't work because the id of the child doc will be 0, which we // would interpret as being our parent document. if (mOuterDoc) { return ChildAt(aChildIdx); } uint64_t childID; - unused << mDoc->SendEmbeddedChildAt(mID, aChildIdx, &childID); + Unused << mDoc->SendEmbeddedChildAt(mID, aChildIdx, &childID); return mDoc->GetAccessible(childID); } ProxyAccessible* ProxyAccessible::FocusedChild() { uint64_t childID = 0; bool ok = false; - unused << mDoc->SendFocusedChild(mID, &childID, &ok); + Unused << mDoc->SendFocusedChild(mID, &childID, &ok); return ok ? mDoc->GetAccessible(childID) : nullptr; } ProxyAccessible* ProxyAccessible::ChildAtPoint(int32_t aX, int32_t aY, Accessible::EWhichChildAtPoint aWhichChild) { uint64_t childID = 0; bool ok = false; - unused << mDoc->SendAccessibleAtPoint(mID, aX, aY, false, + Unused << mDoc->SendAccessibleAtPoint(mID, aX, aY, false, static_cast<uint32_t>(aWhichChild), &childID, &ok); return ok ? mDoc->GetAccessible(childID) : nullptr; } nsIntRect ProxyAccessible::Bounds() { nsIntRect rect; - unused << mDoc->SendExtents(mID, false, + Unused << mDoc->SendExtents(mID, false, &(rect.x), &(rect.y), &(rect.width), &(rect.height)); return rect; } void ProxyAccessible::Language(nsString& aLocale) { - unused << mDoc->SendLanguage(mID, &aLocale); + Unused << mDoc->SendLanguage(mID, &aLocale); } void ProxyAccessible::DocType(nsString& aType) { - unused << mDoc->SendDocType(mID, &aType); + Unused << mDoc->SendDocType(mID, &aType); } void ProxyAccessible::Title(nsString& aTitle) { - unused << mDoc->SendTitle(mID, &aTitle); + Unused << mDoc->SendTitle(mID, &aTitle); } void ProxyAccessible::URL(nsString& aURL) { - unused << mDoc->SendURL(mID, &aURL); + Unused << mDoc->SendURL(mID, &aURL); } void ProxyAccessible::MimeType(nsString aMime) { - unused << mDoc->SendMimeType(mID, &aMime); + Unused << mDoc->SendMimeType(mID, &aMime); } void ProxyAccessible::URLDocTypeMimeType(nsString& aURL, nsString& aDocType, nsString& aMimeType) { - unused << mDoc->SendURLDocTypeMimeType(mID, &aURL, &aDocType, &aMimeType); + Unused << mDoc->SendURLDocTypeMimeType(mID, &aURL, &aDocType, &aMimeType); } ProxyAccessible* ProxyAccessible::AccessibleAtPoint(int32_t aX, int32_t aY, bool aNeedsScreenCoords) { uint64_t childID = 0; bool ok = false; - unused << + Unused << mDoc->SendAccessibleAtPoint(mID, aX, aY, aNeedsScreenCoords, static_cast<uint32_t>(Accessible::eDirectChild), &childID, &ok); return ok ? mDoc->GetAccessible(childID) : nullptr; } void ProxyAccessible::Extents(bool aNeedsScreenCoords, int32_t* aX, int32_t* aY, int32_t* aWidth, int32_t* aHeight) { - unused << mDoc->SendExtents(mID, aNeedsScreenCoords, aX, aY, aWidth, aHeight); + Unused << mDoc->SendExtents(mID, aNeedsScreenCoords, aX, aY, aWidth, aHeight); } Accessible* ProxyAccessible::OuterDocOfRemoteBrowser() const { auto tab = static_cast<dom::TabParent*>(mDoc->Manager()); dom::Element* frame = tab->GetOwnerElement(); NS_ASSERTION(frame, "why isn't the tab in a frame!");
--- a/caps/DomainPolicy.cpp +++ b/caps/DomainPolicy.cpp @@ -30,17 +30,17 @@ BroadcastDomainSetChange(DomainSetType a if (!parents.Length()) { return NS_OK; } OptionalURIParams uri; SerializeURI(aDomain, uri); for (uint32_t i = 0; i < parents.Length(); i++) { - unused << parents[i]->SendDomainSetChanged(aSetType, aChangeType, uri); + Unused << parents[i]->SendDomainSetChanged(aSetType, aChangeType, uri); } return NS_OK; } DomainPolicy::DomainPolicy() : mBlacklist(new DomainSet(BLACKLIST)) , mSuperBlacklist(new DomainSet(SUPER_BLACKLIST)) , mWhitelist(new DomainSet(WHITELIST)) , mSuperWhitelist(new DomainSet(SUPER_WHITELIST))
--- a/chrome/nsChromeRegistryChrome.cpp +++ b/chrome/nsChromeRegistryChrome.cpp @@ -744,17 +744,17 @@ static void SendManifestEntry(const ChromeRegistryItem &aItem) { nsTArray<ContentParent*> parents; ContentParent::GetAll(parents); if (!parents.Length()) return; for (uint32_t i = 0; i < parents.Length(); i++) { - unused << parents[i]->SendRegisterChromeItem(aItem); + Unused << parents[i]->SendRegisterChromeItem(aItem); } } void nsChromeRegistryChrome::ManifestContent(ManifestProcessingContext& cx, int lineno, char *const * argv, int flags) { char* package = argv[0];
--- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5102,17 +5102,17 @@ nsDocShell::DisplayLoadError(nsresult aE // Display an error page LoadErrorPage(aURI, aURL, errorPage.get(), error.get(), messageStr.get(), cssClass.get(), aFailedChannel); } else { // The prompter reqires that our private window has a document (or it // asserts). Satisfy that assertion now since GetDoc will force // creation of one if it hasn't already been created. if (mScriptGlobal) { - unused << mScriptGlobal->GetDoc(); + Unused << mScriptGlobal->GetDoc(); } // Display a message box prompter->Alert(nullptr, messageStr.get()); } return NS_OK; }
--- a/dom/asmjscache/AsmJSCache.cpp +++ b/dom/asmjscache/AsmJSCache.cpp @@ -51,17 +51,17 @@ using mozilla::dom::quota::PersistenceTy using mozilla::dom::quota::QuotaManager; using mozilla::dom::quota::QuotaObject; using mozilla::dom::quota::UsageInfo; using mozilla::ipc::AssertIsOnBackgroundThread; using mozilla::ipc::BackgroundChild; using mozilla::ipc::IsOnBackgroundThread; using mozilla::ipc::PBackgroundChild; using mozilla::ipc::PrincipalInfo; -using mozilla::unused; +using mozilla::Unused; using mozilla::HashString; namespace mozilla { MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPRFileDesc, PRFileDesc, PR_Close); namespace dom { namespace asmjscache { @@ -473,17 +473,17 @@ private: mState = eFinished; MOZ_ASSERT(!mOpened); FinishOnOwningThread(); if (!mActorDestroyed) { - unused << Send__delete__(this, mResult); + Unused << Send__delete__(this, mResult); } } // The same as method above but is intended to be called off the owning // thread. void FailOnNonOwningThread() { @@ -988,17 +988,17 @@ ParentRunnable::Run() case eSendingMetadataForRead: { AssertIsOnOwningThread(); MOZ_ASSERT(mOpenMode == eOpenForRead); mState = eWaitingToOpenCacheFileForRead; // Metadata is now open. if (!SendOnOpenMetadataForRead(mMetadata)) { - unused << Send__delete__(this, JS::AsmJSCache_InternalError); + Unused << Send__delete__(this, JS::AsmJSCache_InternalError); } return NS_OK; } case eDispatchToMainThread: { MOZ_ASSERT(NS_IsMainThread()); @@ -1030,17 +1030,17 @@ ParentRunnable::Run() // The entry is now open. MOZ_ASSERT(!mOpened); mOpened = true; FileDescriptor::PlatformHandleType handle = FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFileDesc)); if (!SendOnOpenCacheFile(mFileSize, FileDescriptor(handle))) { - unused << Send__delete__(this, JS::AsmJSCache_InternalError); + Unused << Send__delete__(this, JS::AsmJSCache_InternalError); } return NS_OK; } case eFailing: { AssertIsOnOwningThread(); @@ -1446,17 +1446,17 @@ ChildRunnable::Run() mOpened = false; // Match the AddRef in BlockUntilOpen(). The main thread event loop still // holds an outstanding ref which will keep 'this' alive until returning to // the event loop. Release(); if (!mActorDestroyed) { - unused << Send__delete__(this, JS::AsmJSCache_Success); + Unused << Send__delete__(this, JS::AsmJSCache_Success); } mState = eFinished; return NS_OK; } case eBackgroundChildPending: case eOpening:
--- a/dom/base/ImageEncoder.cpp +++ b/dom/base/ImageEncoder.cpp @@ -205,17 +205,17 @@ public: if (NS_FAILED(rv)) { mEncodingCompleteEvent->SetFailed(); } else { mEncodingCompleteEvent->SetMembers(imgData, imgSize, mType); } rv = NS_DispatchToMainThread(mEncodingCompleteEvent); if (NS_FAILED(rv)) { // Better to leak than to crash. - unused << mEncodingCompleteEvent.forget(); + Unused << mEncodingCompleteEvent.forget(); return rv; } return rv; } private: nsAutoString mType;
--- a/dom/base/nsContentPermissionHelper.cpp +++ b/dom/base/nsContentPermissionHelper.cpp @@ -28,17 +28,17 @@ #include "nsContentPermissionHelper.h" #include "nsJSUtils.h" #include "nsISupportsPrimitives.h" #include "nsServiceManagerUtils.h" #include "nsIDocument.h" #include "nsIDOMEvent.h" #include "nsWeakPtr.h" -using mozilla::unused; // <snicker> +using mozilla::Unused; // <snicker> using namespace mozilla::dom; using namespace mozilla; #define kVisibilityChange "visibilitychange" NS_IMPL_ISUPPORTS(VisibilityChangeListener, nsIDOMEventListener) VisibilityChangeListener::VisibilityChangeListener(nsPIDOMWindow* aWindow) @@ -468,17 +468,17 @@ NS_IMPL_ISUPPORTS(nsContentPermissionReq NS_IMETHODIMP nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy ::GetVisibility(nsIContentPermissionRequestCallback* aCallback) { NS_ENSURE_ARG_POINTER(aCallback); mGetCallback = aCallback; mWaitGettingResult = true; - unused << mParent->SendGetVisibility(); + Unused << mParent->SendGetVisibility(); return NS_OK; } NS_IMETHODIMP nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy ::SetOnVisibilityChange(nsIContentPermissionRequestCallback* aCallback) { mOnChangeCallback = aCallback; @@ -603,17 +603,17 @@ nsContentPermissionRequestProxy::Cancel( // Don't send out the delete message when the managing protocol (PBrowser) is // being destroyed and PContentPermissionRequest will soon be. if (mParent->IsBeingDestroyed()) { return NS_ERROR_FAILURE; } nsTArray<PermissionChoice> emptyChoices; - unused << ContentPermissionRequestParent::Send__delete__(mParent, false, emptyChoices); + Unused << ContentPermissionRequestParent::Send__delete__(mParent, false, emptyChoices); mParent = nullptr; return NS_OK; } NS_IMETHODIMP nsContentPermissionRequestProxy::Allow(JS::HandleValue aChoices) { if (mParent == nullptr) { @@ -667,17 +667,17 @@ nsContentPermissionRequestProxy::Allow(J choices.AppendElement(PermissionChoice(type, choice)); } } } else { MOZ_ASSERT(false, "SelectedChoices should be undefined or an JS object"); return NS_ERROR_FAILURE; } - unused << ContentPermissionRequestParent::Send__delete__(mParent, true, choices); + Unused << ContentPermissionRequestParent::Send__delete__(mParent, true, choices); mParent = nullptr; return NS_OK; } void nsContentPermissionRequestProxy::NotifyVisibility(const bool& aIsVisible) { MOZ_ASSERT(mRequester); @@ -771,22 +771,22 @@ RemotePermissionRequest::RecvGetVisibili { nsCOMPtr<nsIDocShell> docshell = mWindow->GetDocShell(); if (!docshell) { return false; } bool isActive = false; docshell->GetIsActive(&isActive); - unused << SendNotifyVisibility(isActive); + Unused << SendNotifyVisibility(isActive); return true; } NS_IMETHODIMP RemotePermissionRequest::NotifyVisibility(bool isVisible) { if (!mIPCOpen) { return NS_OK; } - unused << SendNotifyVisibility(isVisible); + Unused << SendNotifyVisibility(isVisible); return NS_OK; }
--- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -1118,17 +1118,17 @@ nsFocusManager::EnsureCurrentWidgetFocus } } } void ActivateOrDeactivateChild(TabParent* aParent, void* aArg) { bool active = static_cast<bool>(aArg); - unused << aParent->SendParentActivated(active); + Unused << aParent->SendParentActivated(active); } void nsFocusManager::ActivateOrDeactivate(nsPIDOMWindow* aWindow, bool aActive) { if (!aWindow) { return; }
--- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -985,18 +985,18 @@ nsFrameLoader::SwapWithOtherRemoteLoader ourShell->BackingScaleFactorChanged(); otherShell->BackingScaleFactorChanged(); ourDoc->FlushPendingNotifications(Flush_Layout); otherDoc->FlushPendingNotifications(Flush_Layout); mInSwap = aOther->mInSwap = false; - unused << mRemoteBrowser->SendSwappedWithOtherRemoteLoader(); - unused << aOther->mRemoteBrowser->SendSwappedWithOtherRemoteLoader(); + Unused << mRemoteBrowser->SendSwappedWithOtherRemoteLoader(); + Unused << aOther->mRemoteBrowser->SendSwappedWithOtherRemoteLoader(); return NS_OK; } class MOZ_RAII AutoResetInFrameSwap final { public: AutoResetInFrameSwap(nsFrameLoader* aThisFrameLoader, nsFrameLoader* aOtherFrameLoader, @@ -2291,17 +2291,17 @@ nsFrameLoader::TryRemoteBrowser() rootChromeWin->GetBrowserDOMWindow(getter_AddRefs(browserDOMWin)); mRemoteBrowser->SetBrowserDOMWindow(browserDOMWin); } if (mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::mozpasspointerevents, nsGkAtoms::_true, eCaseMatters)) { - unused << mRemoteBrowser->SendSetUpdateHitRegion(true); + Unused << mRemoteBrowser->SendSetUpdateHitRegion(true); } ReallyLoadFrameScripts(); InitializeBrowserAPI(); return true; } @@ -2336,24 +2336,24 @@ nsFrameLoader::DeactivateRemoteFrame() { return NS_OK; } return NS_ERROR_UNEXPECTED; } void nsFrameLoader::ActivateUpdateHitRegion() { if (mRemoteBrowser) { - unused << mRemoteBrowser->SendSetUpdateHitRegion(true); + Unused << mRemoteBrowser->SendSetUpdateHitRegion(true); } } void nsFrameLoader::DeactivateUpdateHitRegion() { if (mRemoteBrowser) { - unused << mRemoteBrowser->SendSetUpdateHitRegion(false); + Unused << mRemoteBrowser->SendSetUpdateHitRegion(false); } } NS_IMETHODIMP nsFrameLoader::SendCrossProcessMouseEvent(const nsAString& aType, float aX, float aY, int32_t aButton, @@ -2852,17 +2852,17 @@ nsFrameLoader::ResetPermissionManagerSta /** * Send the RequestNotifyAfterRemotePaint message to the current Tab. */ NS_IMETHODIMP nsFrameLoader::RequestNotifyAfterRemotePaint() { // If remote browsing (e10s), handle this with the TabParent. if (mRemoteBrowser) { - unused << mRemoteBrowser->SendRequestNotifyAfterRemotePaint(); + Unused << mRemoteBrowser->SendRequestNotifyAfterRemotePaint(); } return NS_OK; } NS_IMETHODIMP nsFrameLoader::RequestNotifyLayerTreeReady() {
--- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -11618,17 +11618,17 @@ nsGlobalWindow::SetTimeoutOrInterval(nsI RefPtr<nsTimeout> copy = timeout; rv = timeout->InitTimer(realInterval); if (NS_FAILED(rv)) { return rv; } // The timeout is now also held in the timer's closure. - unused << copy.forget(); + Unused << copy.forget(); } else { // If we are frozen, however, then we instead simply set // timeout->mTimeRemaining to be the "time remaining" in the timeout (i.e., // the interval itself). We don't create a timer for it, since that will // happen when we are thawed and the timeout will then get a timer and run // to completion. timeout->mTimeRemaining = delta; @@ -12024,17 +12024,17 @@ nsGlobalWindow::RunTimeout(nsTimeout *aT bool timeout_was_cleared = RunTimeoutHandler(timeout, scx); if (timeout_was_cleared) { // The running timeout's window was cleared, this means that // ClearAllTimeouts() was called from a *nested* call, possibly // through a timeout that fired while a modal (to this window) // dialog was open or through other non-obvious paths. MOZ_ASSERT(dummy_timeout->HasRefCntOne(), "dummy_timeout may leak"); - unused << timeoutExtraRef.forget().take(); + Unused << timeoutExtraRef.forget().take(); mTimeoutInsertionPoint = last_insertion_point; return; } // If we have a regular interval timer, we re-schedule the // timeout, accounting for clock drift.
--- a/dom/base/nsScriptLoader.cpp +++ b/dom/base/nsScriptLoader.cpp @@ -814,18 +814,18 @@ NotifyOffThreadScriptLoadCompletedRunnab nsCOMPtr<nsIThread> mainThread; NS_GetMainThread(getter_AddRefs(mainThread)); if (mainThread) { NS_ProxyRelease(mainThread, mRequest); NS_ProxyRelease(mainThread, mLoader); } else { MOZ_ASSERT(false, "We really shouldn't leak!"); // Better to leak than crash. - unused << mRequest.forget(); - unused << mLoader.forget(); + Unused << mRequest.forget(); + Unused << mLoader.forget(); } } } NS_IMETHODIMP NotifyOffThreadScriptLoadCompletedRunnable::Run() { MOZ_ASSERT(NS_IsMainThread()); @@ -885,17 +885,17 @@ nsScriptLoader::AttemptAsyncScriptCompil OffThreadScriptLoaderCallback, static_cast<void*>(runnable))) { return NS_ERROR_OUT_OF_MEMORY; } mDocument->BlockOnload(); aRequest->mProgress = nsScriptLoadRequest::Progress_Compiling; - unused << runnable.forget(); + Unused << runnable.forget(); return NS_OK; } nsresult nsScriptLoader::CompileOffThreadOrProcessRequest(nsScriptLoadRequest* aRequest, bool* oCompiledOffThread) { NS_ASSERTION(nsContentUtils::IsSafeToRunScript(),
--- a/dom/bluetooth/bluedroid/BluetoothDaemonA2dpInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonA2dpInterface.cpp @@ -60,17 +60,17 @@ BluetoothDaemonA2dpModule::ConnectCmd( nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonA2dpModule::DisconnectCmd( const BluetoothAddress& aRemoteAddr, BluetoothA2dpResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -81,17 +81,17 @@ BluetoothDaemonA2dpModule::DisconnectCmd nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } // Responses // void BluetoothDaemonA2dpModule::ErrorRsp(
--- a/dom/bluetooth/bluedroid/BluetoothDaemonAvrcpInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonAvrcpInterface.cpp @@ -63,17 +63,17 @@ BluetoothDaemonAvrcpModule::GetPlayStatu nsresult rv = PackPDU(aPlayStatus, aSongLen, aSongPos, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::ListPlayerAppAttrRspCmd( int aNumAttr, const BluetoothAvrcpPlayerAttribute* aPAttrs, BluetoothAvrcpResultHandler* aRes) { @@ -89,17 +89,17 @@ BluetoothDaemonAvrcpModule::ListPlayerAp PackArray<BluetoothAvrcpPlayerAttribute>(aPAttrs, aNumAttr), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::ListPlayerAppValueRspCmd( int aNumVal, uint8_t* aPVals, BluetoothAvrcpResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -113,17 +113,17 @@ BluetoothDaemonAvrcpModule::ListPlayerAp PackArray<uint8_t>(aPVals, aNumVal), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::GetPlayerAppValueRspCmd( uint8_t aNumAttrs, const uint8_t* aIds, const uint8_t* aValues, BluetoothAvrcpResultHandler* aRes) { @@ -138,17 +138,17 @@ BluetoothDaemonAvrcpModule::GetPlayerApp BluetoothAvrcpAttributeValuePairs(aIds, aValues, aNumAttrs), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::GetPlayerAppAttrTextRspCmd( int aNumAttr, const uint8_t* aIds, const char** aTexts, BluetoothAvrcpResultHandler* aRes) { @@ -162,17 +162,17 @@ BluetoothDaemonAvrcpModule::GetPlayerApp BluetoothAvrcpAttributeTextPairs(aIds, aTexts, aNumAttr), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::GetPlayerAppValueTextRspCmd( int aNumVal, const uint8_t* aIds, const char** aTexts, BluetoothAvrcpResultHandler* aRes) { @@ -186,17 +186,17 @@ BluetoothDaemonAvrcpModule::GetPlayerApp BluetoothAvrcpAttributeTextPairs(aIds, aTexts, aNumVal), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::GetElementAttrRspCmd( uint8_t aNumAttr, const BluetoothAvrcpElementAttribute* aAttr, BluetoothAvrcpResultHandler* aRes) { @@ -210,17 +210,17 @@ BluetoothDaemonAvrcpModule::GetElementAt PackArray<BluetoothAvrcpElementAttribute>(aAttr, aNumAttr), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::SetPlayerAppValueRspCmd( BluetoothAvrcpStatus aRspStatus, BluetoothAvrcpResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -232,17 +232,17 @@ BluetoothDaemonAvrcpModule::SetPlayerApp nsresult rv = PackPDU(aRspStatus, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::RegisterNotificationRspCmd( BluetoothAvrcpEvent aEvent, BluetoothAvrcpNotification aType, const BluetoothAvrcpNotificationParam& aParam, BluetoothAvrcpResultHandler* aRes) @@ -261,17 +261,17 @@ BluetoothDaemonAvrcpModule::RegisterNoti data, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonAvrcpModule::SetVolumeCmd(uint8_t aVolume, BluetoothAvrcpResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -283,17 +283,17 @@ BluetoothDaemonAvrcpModule::SetVolumeCmd nsresult rv = PackPDU(aVolume, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } // Responses // void BluetoothDaemonAvrcpModule::ErrorRsp(
--- a/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonCoreInterface.cpp @@ -60,34 +60,34 @@ BluetoothDaemonCoreModule::EnableCmd(Blu nsAutoPtr<DaemonSocketPDU> pdu( new DaemonSocketPDU(SERVICE_ID, OPCODE_ENABLE, 0)); nsresult rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::DisableCmd(BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); nsAutoPtr<DaemonSocketPDU> pdu( new DaemonSocketPDU(SERVICE_ID, OPCODE_DISABLE, 0)); nsresult rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetAdapterPropertiesCmd( BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -95,17 +95,17 @@ BluetoothDaemonCoreModule::GetAdapterPro nsAutoPtr<DaemonSocketPDU> pdu( new DaemonSocketPDU(SERVICE_ID, OPCODE_GET_ADAPTER_PROPERTIES, 0)); nsresult rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetAdapterPropertyCmd(BluetoothPropertyType aType, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -117,17 +117,17 @@ BluetoothDaemonCoreModule::GetAdapterPro nsresult rv = PackPDU(aType, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::SetAdapterPropertyCmd( const BluetoothProperty& aProperty, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -139,17 +139,17 @@ BluetoothDaemonCoreModule::SetAdapterPro nsresult rv = PackPDU(aProperty, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetRemoteDevicePropertiesCmd( const BluetoothAddress& aRemoteAddr, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -161,17 +161,17 @@ BluetoothDaemonCoreModule::GetRemoteDevi nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetRemoteDevicePropertyCmd( const BluetoothAddress& aRemoteAddr, BluetoothPropertyType aType, BluetoothResultHandler* aRes) @@ -185,17 +185,17 @@ BluetoothDaemonCoreModule::GetRemoteDevi nsresult rv = PackPDU(aRemoteAddr, aType, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::SetRemoteDevicePropertyCmd( const BluetoothAddress& aRemoteAddr, const BluetoothProperty& aProperty, BluetoothResultHandler* aRes) @@ -209,17 +209,17 @@ BluetoothDaemonCoreModule::SetRemoteDevi nsresult rv = PackPDU(aRemoteAddr, aProperty, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetRemoteServiceRecordCmd( const BluetoothAddress& aRemoteAddr, const BluetoothUuid& aUuid, BluetoothResultHandler* aRes) { @@ -232,17 +232,17 @@ BluetoothDaemonCoreModule::GetRemoteServ nsresult rv = PackPDU(aRemoteAddr, aUuid, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::GetRemoteServicesCmd( const BluetoothAddress& aRemoteAddr, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -253,51 +253,51 @@ BluetoothDaemonCoreModule::GetRemoteServ nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::StartDiscoveryCmd(BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); nsAutoPtr<DaemonSocketPDU> pdu( new DaemonSocketPDU(SERVICE_ID, OPCODE_START_DISCOVERY, 0)); nsresult rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::CancelDiscoveryCmd(BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); nsAutoPtr<DaemonSocketPDU> pdu( new DaemonSocketPDU(SERVICE_ID, OPCODE_CANCEL_DISCOVERY, 0)); nsresult rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::CreateBondCmd(const BluetoothAddress& aBdAddr, BluetoothTransport aTransport, BluetoothResultHandler* aRes) { @@ -314,17 +314,17 @@ BluetoothDaemonCoreModule::CreateBondCmd #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::RemoveBondCmd(const BluetoothAddress& aBdAddr, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -336,17 +336,17 @@ BluetoothDaemonCoreModule::RemoveBondCmd nsresult rv = PackPDU(aBdAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::CancelBondCmd(const BluetoothAddress& aBdAddr, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -358,17 +358,17 @@ BluetoothDaemonCoreModule::CancelBondCmd nsresult rv = PackPDU(aBdAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::PinReplyCmd(const BluetoothAddress& aBdAddr, bool aAccept, const BluetoothPinCode& aPinCode, BluetoothResultHandler* aRes) @@ -382,17 +382,17 @@ BluetoothDaemonCoreModule::PinReplyCmd(c nsresult rv = PackPDU(aBdAddr, aAccept, aPinCode, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::SspReplyCmd(const BluetoothAddress& aBdAddr, BluetoothSspVariant aVariant, bool aAccept, uint32_t aPasskey, BluetoothResultHandler* aRes) @@ -406,17 +406,17 @@ BluetoothDaemonCoreModule::SspReplyCmd(c nsresult rv = PackPDU(aBdAddr, aVariant, aAccept, aPasskey, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::DutModeConfigureCmd(bool aEnable, BluetoothResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -428,17 +428,17 @@ BluetoothDaemonCoreModule::DutModeConfig nsresult rv = PackPDU(aEnable, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::DutModeSendCmd(uint16_t aOpcode, uint8_t* aBuf, uint8_t aLen, BluetoothResultHandler* aRes) { @@ -452,17 +452,17 @@ BluetoothDaemonCoreModule::DutModeSendCm *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonCoreModule::LeTestModeCmd(uint16_t aOpcode, uint8_t* aBuf, uint8_t aLen, BluetoothResultHandler* aRes) { @@ -476,17 +476,17 @@ BluetoothDaemonCoreModule::LeTestModeCmd *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } // Responses // void BluetoothDaemonCoreModule::ErrorRsp(const DaemonSocketPDUHeader& aHeader,
--- a/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp @@ -62,17 +62,17 @@ BluetoothDaemonGattModule::ClientRegiste if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientUnregisterCmd( int aClientIf, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -84,17 +84,17 @@ BluetoothDaemonGattModule::ClientUnregis nsresult rv = PackPDU(aClientIf, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientScanCmd( int aClientIf, bool aStart, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -108,17 +108,17 @@ BluetoothDaemonGattModule::ClientScanCmd PackConversion<bool, uint8_t>(aStart), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientConnectCmd( int aClientIf, const BluetoothAddress& aBdAddr, bool aIsDirect, BluetoothTransport aTransport, BluetoothGattResultHandler* aRes) { @@ -138,17 +138,17 @@ BluetoothDaemonGattModule::ClientConnect PackConversion<BluetoothTransport, int32_t>(aTransport), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientDisconnectCmd( int aClientIf, const BluetoothAddress& aBdAddr, int aConnId, BluetoothGattResultHandler* aRes) { @@ -166,17 +166,17 @@ BluetoothDaemonGattModule::ClientDisconn PackConversion<int, int32_t>(aConnId), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientListenCmd( int aClientIf, bool aIsStart, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -191,17 +191,17 @@ BluetoothDaemonGattModule::ClientListenC PackConversion<bool, uint8_t>(aIsStart), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientRefreshCmd( int aClientIf, const BluetoothAddress& aBdAddr, BluetoothGattResultHandler* aRes) { @@ -217,17 +217,17 @@ BluetoothDaemonGattModule::ClientRefresh *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientSearchServiceCmd( int aConnId, bool aFiltered, const BluetoothUuid& aUuid, BluetoothGattResultHandler* aRes) { @@ -245,17 +245,17 @@ BluetoothDaemonGattModule::ClientSearchS *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientGetIncludedServiceCmd( int aConnId, const BluetoothGattServiceId& aServiceId, bool aContinuation, const BluetoothGattServiceId& aStartServiceId, BluetoothGattResultHandler* aRes) @@ -274,17 +274,17 @@ BluetoothDaemonGattModule::ClientGetIncl aStartServiceId, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientGetCharacteristicCmd( int aConnId, const BluetoothGattServiceId& aServiceId, bool aContinuation, const BluetoothGattId& aStartCharId, BluetoothGattResultHandler* aRes) @@ -304,17 +304,17 @@ BluetoothDaemonGattModule::ClientGetChar if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientGetDescriptorCmd( int aConnId, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, bool aContinuation, const BluetoothGattId& aStartDescriptorId, @@ -336,17 +336,17 @@ BluetoothDaemonGattModule::ClientGetDesc aStartDescriptorId, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientReadCharacteristicCmd( int aConnId, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, BluetoothGattAuthReq aAuthReq, BluetoothGattResultHandler* aRes) @@ -364,17 +364,17 @@ BluetoothDaemonGattModule::ClientReadCha aCharId, aAuthReq, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientWriteCharacteristicCmd( int aConnId, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, BluetoothGattWriteType aWriteType, int aLength, BluetoothGattAuthReq aAuthReq, char* aValue, @@ -391,17 +391,17 @@ BluetoothDaemonGattModule::ClientWriteCh PackArray<char>(aValue, aLength), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientReadDescriptorCmd( int aConnId, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, const BluetoothGattId& aDescriptorId, BluetoothGattAuthReq aAuthReq, BluetoothGattResultHandler* aRes) @@ -420,17 +420,17 @@ BluetoothDaemonGattModule::ClientReadDes aCharId, aDescriptorId, aAuthReq, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientWriteDescriptorCmd( int aConnId, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, const BluetoothGattId& aDescriptorId, BluetoothGattWriteType aWriteType, int aLength, @@ -448,17 +448,17 @@ BluetoothDaemonGattModule::ClientWriteDe PackArray<char>(aValue, aLength), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientExecuteWriteCmd( int aConnId, int aIsExecute, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -472,17 +472,17 @@ BluetoothDaemonGattModule::ClientExecute PackConversion<int, int32_t>(aIsExecute), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientRegisterNotificationCmd( int aClientIf, const BluetoothAddress& aBdAddr, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, BluetoothGattResultHandler* aRes) @@ -500,17 +500,17 @@ BluetoothDaemonGattModule::ClientRegiste aBdAddr, aServiceId, aCharId, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientDeregisterNotificationCmd( int aClientIf, const BluetoothAddress& aBdAddr, const BluetoothGattServiceId& aServiceId, const BluetoothGattId& aCharId, BluetoothGattResultHandler* aRes) @@ -528,17 +528,17 @@ BluetoothDaemonGattModule::ClientDeregis aBdAddr, aServiceId, aCharId, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientReadRemoteRssiCmd( int aClientIf, const BluetoothAddress& aBdAddr, BluetoothGattResultHandler* aRes) { @@ -553,17 +553,17 @@ BluetoothDaemonGattModule::ClientReadRem aBdAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientGetDeviceTypeCmd( const BluetoothAddress& aBdAddr, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -575,17 +575,17 @@ BluetoothDaemonGattModule::ClientGetDevi nsresult rv = PackPDU(aBdAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientSetAdvDataCmd( int aServerIf, bool aIsScanRsp, bool aIsNameIncluded, bool aIsTxPowerIncluded, int aMinInterval, int aMaxInterval, int aApperance, uint16_t aManufacturerLen, char* aManufacturerData, @@ -611,17 +611,17 @@ BluetoothDaemonGattModule::ClientSetAdvD aServiceUuidLen, PackArray<char>(aServiceUuid, aServiceUuidLen), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ClientTestCommandCmd( int aCommand, const BluetoothGattTestParam& aTestParam, BluetoothGattResultHandler* aRes) { @@ -645,17 +645,17 @@ BluetoothDaemonGattModule::ClientTestCom aTestParam.mU5, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerRegisterCmd( const BluetoothUuid& aUuid, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -667,17 +667,17 @@ BluetoothDaemonGattModule::ServerRegiste nsresult rv = PackPDU(aUuid, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerUnregisterCmd( int aServerIf, BluetoothGattResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -689,17 +689,17 @@ BluetoothDaemonGattModule::ServerUnregis nsresult rv = PackPDU(PackConversion<int, int32_t>(aServerIf), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerConnectPeripheralCmd( int aServerIf, const BluetoothAddress& aBdAddr, bool aIsDirect, BluetoothTransport aTransport, BluetoothGattResultHandler* aRes) { @@ -719,17 +719,17 @@ BluetoothDaemonGattModule::ServerConnect PackConversion<BluetoothTransport, int32_t>(aTransport), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerDisconnectPeripheralCmd( int aServerIf, const BluetoothAddress& aBdAddr, int aConnId, BluetoothGattResultHandler* aRes) { @@ -746,17 +746,17 @@ BluetoothDaemonGattModule::ServerDisconn PackConversion<int, int32_t>(aConnId), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerAddServiceCmd( int aServerIf, const BluetoothGattServiceId& aServiceId, uint16_t aNumHandles, BluetoothGattResultHandler* aRes) { @@ -772,17 +772,17 @@ BluetoothDaemonGattModule::ServerAddServ PackConversion<uint16_t, int32_t>(aNumHandles), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerAddIncludedServiceCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, const BluetoothAttributeHandle& aIncludedServiceHandle, BluetoothGattResultHandler* aRes) @@ -799,17 +799,17 @@ BluetoothDaemonGattModule::ServerAddIncl aServiceHandle, aIncludedServiceHandle, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerAddCharacteristicCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, const BluetoothUuid& aUuid, BluetoothGattCharProp aProperties, BluetoothGattAttrPerm aPermissions, BluetoothGattResultHandler* aRes) @@ -830,17 +830,17 @@ BluetoothDaemonGattModule::ServerAddChar PackConversion<BluetoothGattAttrPerm, int32_t>(aPermissions), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerAddDescriptorCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, const BluetoothUuid& aUuid, BluetoothGattAttrPerm aPermissions, BluetoothGattResultHandler* aRes) @@ -859,17 +859,17 @@ BluetoothDaemonGattModule::ServerAddDesc PackConversion<BluetoothGattAttrPerm, int32_t>(aPermissions), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerStartServiceCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, BluetoothTransport aTransport, BluetoothGattResultHandler* aRes) { @@ -886,17 +886,17 @@ BluetoothDaemonGattModule::ServerStartSe PackConversion<BluetoothTransport, int32_t>(aTransport), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerStopServiceCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, BluetoothGattResultHandler* aRes) { @@ -911,17 +911,17 @@ BluetoothDaemonGattModule::ServerStopSer PackConversion<int, int32_t>(aServerIf), aServiceHandle, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerDeleteServiceCmd( int aServerIf, const BluetoothAttributeHandle& aServiceHandle, BluetoothGattResultHandler* aRes) { @@ -936,17 +936,17 @@ BluetoothDaemonGattModule::ServerDeleteS PackConversion<int, int32_t>(aServerIf), aServiceHandle, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerSendIndicationCmd( int aServerIf, const BluetoothAttributeHandle& aCharacteristicHandle, int aConnId, int aLength, bool aConfirm, uint8_t* aValue, BluetoothGattResultHandler* aRes) @@ -965,17 +965,17 @@ BluetoothDaemonGattModule::ServerSendInd PackArray<uint8_t>(aValue, aLength), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonGattModule::ServerSendResponseCmd( int aConnId, int aTransId, uint16_t aStatus, const BluetoothGattResponse& aResponse, BluetoothGattResultHandler* aRes) @@ -998,17 +998,17 @@ BluetoothDaemonGattModule::ServerSendRes if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } // Responses // void BluetoothDaemonGattModule::ErrorRsp(
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp @@ -66,17 +66,17 @@ BluetoothDaemonHandsfreeModule::ConnectC nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::DisconnectCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -88,17 +88,17 @@ BluetoothDaemonHandsfreeModule::Disconne nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::ConnectAudioCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -110,17 +110,17 @@ BluetoothDaemonHandsfreeModule::ConnectA nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::DisconnectAudioCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -132,17 +132,17 @@ BluetoothDaemonHandsfreeModule::Disconne nsresult rv = PackPDU(aRemoteAddr, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::StartVoiceRecognitionCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -157,17 +157,17 @@ BluetoothDaemonHandsfreeModule::StartVoi if (NS_FAILED(rv)) { return rv; } #endif rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::StopVoiceRecognitionCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -182,17 +182,17 @@ BluetoothDaemonHandsfreeModule::StopVoic if (NS_FAILED(rv)) { return rv; } #endif rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::VolumeControlCmd( BluetoothHandsfreeVolumeType aType, int aVolume, const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { @@ -212,17 +212,17 @@ BluetoothDaemonHandsfreeModule::VolumeCo #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::DeviceStatusNotificationCmd( BluetoothHandsfreeNetworkState aNtkState, BluetoothHandsfreeServiceType aSvcType, int aSignal, int aBattChg, BluetoothHandsfreeResultHandler* aRes) @@ -241,17 +241,17 @@ BluetoothDaemonHandsfreeModule::DeviceSt PackConversion<int, uint8_t>(aBattChg), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::CopsResponseCmd( const char* aCops, const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { @@ -270,17 +270,17 @@ BluetoothDaemonHandsfreeModule::CopsResp #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::CindResponseCmd( int aSvc, int aNumActive, int aNumHeld, BluetoothHandsfreeCallState aCallSetupState, int aSignal, int aRoam, int aBattChg, @@ -321,17 +321,17 @@ BluetoothDaemonHandsfreeModule::CindResp #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::FormattedAtResponseCmd( const char* aRsp, const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { @@ -350,17 +350,17 @@ BluetoothDaemonHandsfreeModule::Formatte #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::AtResponseCmd( BluetoothHandsfreeAtResponse aResponseCode, int aErrorCode, const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeResultHandler* aRes) { @@ -382,17 +382,17 @@ BluetoothDaemonHandsfreeModule::AtRespon #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::ClccResponseCmd( int aIndex, BluetoothHandsfreeCallDirection aDir, BluetoothHandsfreeCallState aState, BluetoothHandsfreeCallMode aMode, BluetoothHandsfreeCallMptyType aMpty, @@ -425,17 +425,17 @@ BluetoothDaemonHandsfreeModule::ClccResp #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::PhoneStateChangeCmd( int aNumActive, int aNumHeld, BluetoothHandsfreeCallState aCallSetupState, const nsAString& aNumber, BluetoothHandsfreeCallAddressType aType, BluetoothHandsfreeResultHandler* aRes) @@ -458,17 +458,17 @@ BluetoothDaemonHandsfreeModule::PhoneSta PackCString0(NS_ConvertUTF16toUTF8(aNumber)), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } nsresult BluetoothDaemonHandsfreeModule::ConfigureWbsCmd( const BluetoothAddress& aRemoteAddr, BluetoothHandsfreeWbsConfig aConfig, BluetoothHandsfreeResultHandler* aRes) @@ -483,17 +483,17 @@ BluetoothDaemonHandsfreeModule::Configur nsresult rv = PackPDU(aRemoteAddr, aConfig, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return NS_OK; } // Responses // void BluetoothDaemonHandsfreeModule::ErrorRsp(
--- a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp @@ -440,17 +440,17 @@ BluetoothDaemonInterface::Init( BluetoothResultHandler* aRes) { #define BASE_SOCKET_NAME "bluetoothd" static unsigned long POSTFIX_LENGTH = 16; // If we could not cleanup properly before and an old // instance of the daemon is still running, we kill it // here. - unused << NS_WARN_IF(property_set("ctl.stop", "bluetoothd")); + Unused << NS_WARN_IF(property_set("ctl.stop", "bluetoothd")); mResultHandlerQ.AppendElement(aRes); if (!mProtocol) { mProtocol = new BluetoothDaemonProtocol(); } static_cast<BluetoothDaemonCoreModule*>(mProtocol)->SetNotificationHandler( aNotificationHandler); @@ -1001,17 +1001,17 @@ BluetoothDaemonInterface::OnConnectError MOZ_ASSERT(!mResultHandlerQ.IsEmpty()); switch (aIndex) { case NTF_CHANNEL: // Close command channel mCmdChannel->Close(); case CMD_CHANNEL: // Stop daemon and close listen socket - unused << NS_WARN_IF(property_set("ctl.stop", "bluetoothd")); + Unused << NS_WARN_IF(property_set("ctl.stop", "bluetoothd")); mListenSocket->Close(); case LISTEN_SOCKET: if (!mResultHandlerQ.IsEmpty()) { // Signal error to caller RefPtr<BluetoothResultHandler> res = mResultHandlerQ.ElementAt(0); mResultHandlerQ.RemoveElementAt(0); if (res) {
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.cpp @@ -72,17 +72,17 @@ BluetoothDaemonSetupModule::RegisterModu #endif if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonSetupModule::UnregisterModuleCmd( BluetoothSetupServiceId aId, BluetoothSetupResultHandler* aRes) { MOZ_ASSERT(NS_IsMainThread()); @@ -94,17 +94,17 @@ BluetoothDaemonSetupModule::UnregisterMo nsresult rv = PackPDU(aId, *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonSetupModule::ConfigurationCmd( const BluetoothConfigurationParameter* aParam, uint8_t aLen, BluetoothSetupResultHandler* aRes) { @@ -118,17 +118,17 @@ BluetoothDaemonSetupModule::Configuratio aLen, PackArray<BluetoothConfigurationParameter>(aParam, aLen), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } // Responses // void BluetoothDaemonSetupModule::ErrorRsp(const DaemonSocketPDUHeader& aHeader,
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.cpp @@ -44,17 +44,17 @@ BluetoothDaemonSocketModule::ListenCmd(B SocketFlags(aEncrypt, aAuth), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } nsresult BluetoothDaemonSocketModule::ConnectCmd(const BluetoothAddress& aBdAddr, BluetoothSocketType aType, const BluetoothUuid& aServiceUuid, int aChannel, bool aEncrypt, @@ -75,17 +75,17 @@ BluetoothDaemonSocketModule::ConnectCmd( SocketFlags(aEncrypt, aAuth), *pdu); if (NS_FAILED(rv)) { return rv; } rv = Send(pdu, aRes); if (NS_FAILED(rv)) { return rv; } - unused << pdu.forget(); + Unused << pdu.forget(); return rv; } /* |DeleteTask| deletes a class instance on the I/O thread */ template <typename T> class DeleteTask final : public Task {
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp @@ -2296,17 +2296,17 @@ BluetoothServiceBluedroid::RemoteDeviceP mGetRemoteServiceRecordArray[i].mManager->OnGetServiceChannel( bdAddrStr, uuidStr, p.mServiceRecord.mChannel); mGetRemoteServiceRecordArray.RemoveElementAt(i); break; } } - unused << NS_WARN_IF(i == mGetRemoteServiceRecordArray.Length()); + Unused << NS_WARN_IF(i == mGetRemoteServiceRecordArray.Length()); } else if (p.mType == PROPERTY_UNKNOWN) { /* Bug 1065999: working around unknown properties */ } else { BT_LOGD("Other non-handled device properties. Type: %d", p.mType); } } // The order of operations below is
--- a/dom/bluetooth/bluez/BluetoothDBusService.cpp +++ b/dom/bluetooth/bluez/BluetoothDBusService.cpp @@ -1229,17 +1229,17 @@ AppendDeviceName(BluetoothSignal& aSigna bool success = sDBusConnection->SendWithReply( AppendDeviceNameReplyHandler::Callback, handler.get(), 1000, BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(devicePath).get(), DBUS_DEVICE_IFACE, "GetProperties", DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler } class SetPairingConfirmationTask : public Task { public: SetPairingConfirmationTask(const nsAString& aDeviceAddress, bool aConfirm, BluetoothReplyRunnable* aRunnable) @@ -1655,17 +1655,17 @@ private: NS_ConvertUTF16toUTF8(sAdapterPath).get(), DBUS_ADAPTER_IFACE, "RegisterAgent", DBUS_TYPE_OBJECT_PATH, &agentPath, DBUS_TYPE_STRING, &capabilities, DBUS_TYPE_INVALID); NS_ENSURE_TRUE(success, false); - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler return true; } }; class AddReservedServiceRecordsTask : public Task { public: @@ -1694,17 +1694,17 @@ public: BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(sAdapterPath).get(), DBUS_ADAPTER_IFACE, "AddReservedServiceRecords", DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &services, ArrayLength(sServices), DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << handler.forget(); /* picked up by callback handler */ + Unused << handler.forget(); /* picked up by callback handler */ } }; class PrepareAdapterRunnable : public nsRunnable { public: PrepareAdapterRunnable() { } @@ -2385,17 +2385,17 @@ protected: NS_ConvertUTF16toUTF8(mAdapterPath).get(), DBUS_ADAPTER_IFACE, "GetProperties", DBUS_TYPE_INVALID); if (!success) { aReplyError = NS_LITERAL_STRING("SendWithReply failed"); return false; } - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler return true; } bool HandleGetPropertiesReply(DBusMessage* aReply, nsAutoString& aReplyError) { BluetoothValue value; @@ -2445,17 +2445,17 @@ public: bool success = sDBusConnection->SendWithReply( DefaultAdapterPathReplyHandler::Callback, handler.get(), 1000, BLUEZ_DBUS_BASE_IFC, "/", DBUS_MANAGER_IFACE, "DefaultAdapter", DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler } private: RefPtr<BluetoothReplyRunnable> mRunnable; }; nsresult BluetoothDBusService::GetAdaptersInternal(BluetoothReplyRunnable* aRunnable) @@ -2518,17 +2518,17 @@ public: OnSendDiscoveryMessageReply, static_cast<void*>(mRunnable.get()), -1, BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(sAdapterPath).get(), DBUS_ADAPTER_IFACE, mMessageName.get(), DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler } private: const nsCString mMessageName; RefPtr<BluetoothReplyRunnable> mRunnable; }; nsresult @@ -2786,17 +2786,17 @@ protected: BluetoothArrayOfDevicePropertiesReplyHandler::Callback, handler.get(), 1000, BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(mObjectPath).get(), DBUS_DEVICE_IFACE, "GetProperties", DBUS_TYPE_INVALID); NS_ENSURE_TRUE(success, false); - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler return true; } private: nsString mObjectPath; const nsTArray<nsString> mDeviceAddresses; nsTArray<nsString>::size_type mProcessedDeviceAddresses; @@ -2949,17 +2949,17 @@ public: // msg is unref'd as part of SendWithReply bool success = sDBusConnection->SendWithReply( GetVoidCallback, static_cast<void*>(mRunnable), 1000, msg); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler } private: BluetoothObjectType mType; const nsCString mName; RefPtr<BluetoothReplyRunnable> mRunnable; }; @@ -3094,17 +3094,17 @@ public: DBUS_ADAPTER_IFACE, "CreatePairedDevice", DBUS_TYPE_STRING, &deviceAddress, DBUS_TYPE_OBJECT_PATH, &deviceAgentPath, DBUS_TYPE_STRING, &capabilities, DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler /** * FIXME: Bug 820274 * * If the user turns off Bluetooth in the middle of pairing process, * the callback function GetObjectPathCallback may still be called * while enabling next time by dbus daemon. To prevent this from * happening, added a flag to distinguish if Bluetooth has been @@ -3163,17 +3163,17 @@ public: OnRemoveDeviceReply, static_cast<void*>(mRunnable.get()), -1, BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(sAdapterPath).get(), DBUS_ADAPTER_IFACE, "RemoveDevice", DBUS_TYPE_OBJECT_PATH, &cstrDeviceObjectPath, DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler } protected: static void OnRemoveDeviceReply(DBusMessage* aReply, void* aData) { nsAutoString errorStr; if (!aReply) { @@ -3617,17 +3617,17 @@ public: BLUEZ_DBUS_BASE_IFC, NS_ConvertUTF16toUTF8(objectPath).get(), DBUS_DEVICE_IFACE, "GetServiceAttributeValue", DBUS_TYPE_STRING, &cstrServiceUUID, DBUS_TYPE_UINT16, &sProtocolDescriptorList, DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << handler.forget(); // picked up by callback handler + Unused << handler.forget(); // picked up by callback handler } private: nsString mDeviceAddress; nsString mServiceUUID; BluetoothProfileManagerBase* mBluetoothProfileManager; }; @@ -3922,17 +3922,17 @@ public: DBUS_TYPE_STRING, &album, DBUS_TYPE_STRING, &mediaNumber, DBUS_TYPE_STRING, &totalMediaCount, DBUS_TYPE_STRING, &duration, DBUS_TYPE_STRING, &genre, DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler } private: const nsString mDeviceAddress; const nsCString mTitle; const nsCString mArtist; const nsCString mAlbum; int64_t mMediaNumber; @@ -4052,17 +4052,17 @@ public: objectPath.get(), DBUS_CTL_IFACE, "UpdatePlayStatus", DBUS_TYPE_UINT32, &mDuration, DBUS_TYPE_UINT32, &mPosition, DBUS_TYPE_UINT32, &tempPlayStatus, DBUS_TYPE_INVALID); NS_ENSURE_TRUE_VOID(success); - unused << mRunnable.forget(); // picked up by callback handler + Unused << mRunnable.forget(); // picked up by callback handler } private: const nsString mDeviceAddress; int64_t mDuration; int64_t mPosition; ControlPlayStatus mPlayStatus; RefPtr<BluetoothReplyRunnable> mRunnable;
--- a/dom/bluetooth/common/BluetoothService.cpp +++ b/dom/bluetooth/common/BluetoothService.cpp @@ -449,17 +449,17 @@ void BluetoothService::SetEnabled(bool aEnabled) { MOZ_ASSERT(NS_IsMainThread()); AutoInfallibleTArray<BluetoothParent*, 10> childActors; GetAllBluetoothActors(childActors); for (uint32_t index = 0; index < childActors.Length(); index++) { - unused << childActors[index]->SendEnabled(aEnabled); + Unused << childActors[index]->SendEnabled(aEnabled); } /** * mEnabled: real status of bluetooth * aEnabled: expected status of bluetooth */ if (mEnabled == aEnabled) { BT_WARNING("Bluetooth is already %s, or the toggling failed.",
--- a/dom/bluetooth/ipc/BluetoothParent.cpp +++ b/dom/bluetooth/ipc/BluetoothParent.cpp @@ -12,17 +12,17 @@ #include "mozilla/unused.h" #include "nsDebug.h" #include "nsISupportsImpl.h" #include "nsThreadUtils.h" #include "BluetoothReplyRunnable.h" #include "BluetoothService.h" -using mozilla::unused; +using mozilla::Unused; USING_BLUETOOTH_NAMESPACE /******************************************************************************* * BluetoothRequestParent::ReplyRunnable ******************************************************************************/ class BluetoothRequestParent::ReplyRunnable final : public BluetoothReplyRunnable { @@ -94,17 +94,17 @@ BluetoothParent::~BluetoothParent() MOZ_ASSERT(mShutdownState == Dead); } void BluetoothParent::BeginShutdown() { // Only do something here if we haven't yet begun the shutdown sequence. if (mShutdownState == Running) { - unused << SendBeginShutdown(); + Unused << SendBeginShutdown(); mShutdownState = SentBeginShutdown; } } bool BluetoothParent::InitWithService(BluetoothService* aService) { MOZ_ASSERT(aService); @@ -352,17 +352,17 @@ BluetoothParent::DeallocPBluetoothReques { delete aActor; return true; } void BluetoothParent::Notify(const BluetoothSignal& aSignal) { - unused << SendNotify(aSignal); + Unused << SendNotify(aSignal); } /******************************************************************************* * BluetoothRequestParent ******************************************************************************/ BluetoothRequestParent::BluetoothRequestParent(BluetoothService* aService) : mService(aService)
--- a/dom/broadcastchannel/BroadcastChannelParent.cpp +++ b/dom/broadcastchannel/BroadcastChannelParent.cpp @@ -55,17 +55,17 @@ BroadcastChannelParent::RecvClose() if (NS_WARN_IF(!mService)) { return false; } mService->UnregisterActor(this); mService = nullptr; - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } void BroadcastChannelParent::ActorDestroy(ActorDestroyReason aWhy) { AssertIsOnBackgroundThread(); @@ -100,14 +100,14 @@ BroadcastChannelParent::CheckAndDeliver( BackgroundParent::GetOrCreateActorForBlobImpl(Manager(), impl); if (!blobParent) { return; } newData.blobsParent()[i] = blobParent; } - unused << SendNotify(newData); + Unused << SendNotify(newData); } } } // namespace dom } // namespace mozilla
--- a/dom/cache/AutoUtils.cpp +++ b/dom/cache/AutoUtils.cpp @@ -19,17 +19,17 @@ #include "mozilla/ipc/FileDescriptorSetChild.h" #include "mozilla/ipc/FileDescriptorSetParent.h" #include "mozilla/ipc/PBackgroundParent.h" #include "nsCRT.h" #include "nsHttp.h" namespace { -using mozilla::unused; +using mozilla::Unused; using mozilla::dom::cache::CachePushStreamChild; using mozilla::dom::cache::CacheReadStream; using mozilla::dom::cache::CacheReadStreamOrVoid; using mozilla::ipc::FileDescriptor; using mozilla::ipc::FileDescriptorSetChild; using mozilla::ipc::FileDescriptorSetParent; using mozilla::ipc::OptionalFileDescriptorSet; @@ -49,17 +49,17 @@ CleanupChildFds(CacheReadStream& aReadSt nsAutoTArray<FileDescriptor, 4> fds; FileDescriptorSetChild* fdSetActor = static_cast<FileDescriptorSetChild*>(aReadStream.fds().get_PFileDescriptorSetChild()); MOZ_ASSERT(fdSetActor); if (aAction == Delete) { - unused << fdSetActor->Send__delete__(fdSetActor); + Unused << fdSetActor->Send__delete__(fdSetActor); } // FileDescriptorSet doesn't clear its fds in its ActorDestroy, so we // unconditionally forget them here. The fds themselves are auto-closed in // ~FileDescriptor since they originated in this process. fdSetActor->ForgetFileDescriptors(fds); } @@ -109,17 +109,17 @@ CleanupParentFds(CacheReadStream& aReadS nsAutoTArray<FileDescriptor, 4> fds; FileDescriptorSetParent* fdSetActor = static_cast<FileDescriptorSetParent*>(aReadStream.fds().get_PFileDescriptorSetParent()); MOZ_ASSERT(fdSetActor); if (aAction == Delete) { - unused << fdSetActor->Send__delete__(fdSetActor); + Unused << fdSetActor->Send__delete__(fdSetActor); } // FileDescriptorSet doesn't clear its fds in its ActorDestroy, so we // unconditionally forget them here. The fds themselves are auto-closed in // ~FileDescriptor since they originated in this process. fdSetActor->ForgetFileDescriptors(fds); } @@ -477,25 +477,25 @@ AutoParentOpResult::~AutoParentOpResult( break; } case CacheOpResult::TStorageOpenResult: { StorageOpenResult& result = mOpResult.get_StorageOpenResult(); if (action == Forget || result.actorParent() == nullptr) { break; } - unused << PCacheParent::Send__delete__(result.actorParent()); + Unused << PCacheParent::Send__delete__(result.actorParent()); } default: // other types do not need clean up break; } if (action == Delete && mStreamControl) { - unused << PCacheStreamControlParent::Send__delete__(mStreamControl); + Unused << PCacheStreamControlParent::Send__delete__(mStreamControl); } } void AutoParentOpResult::Add(CacheId aOpenedCacheId, Manager* aManager) { MOZ_ASSERT(mOpResult.type() == CacheOpResult::TStorageOpenResult); MOZ_ASSERT(mOpResult.get_StorageOpenResult().actorParent() == nullptr);
--- a/dom/cache/CacheChild.cpp +++ b/dom/cache/CacheChild.cpp @@ -119,17 +119,17 @@ CacheChild::StartDestroy() } listener->DestroyInternal(this); // Cache listener should call ClearListener() in DestroyInternal() MOZ_ASSERT(!mListener); // Start actor destruction from parent process - unused << SendTeardown(); + Unused << SendTeardown(); } void CacheChild::ActorDestroy(ActorDestroyReason aReason) { NS_ASSERT_OWNINGTHREAD(CacheChild); RefPtr<Cache> listener = mListener; if (listener) {
--- a/dom/cache/CacheOpParent.cpp +++ b/dom/cache/CacheOpParent.cpp @@ -51,17 +51,17 @@ CacheOpParent::Execute(ManagerId* aManag { NS_ASSERT_OWNINGTHREAD(CacheOpParent); MOZ_ASSERT(!mManager); MOZ_ASSERT(!mVerifier); RefPtr<Manager> manager; nsresult rv = Manager::GetOrCreate(aManagerId, getter_AddRefs(manager)); if (NS_WARN_IF(NS_FAILED(rv))) { - unused << Send__delete__(this, ErrorResult(rv), void_t()); + Unused << Send__delete__(this, ErrorResult(rv), void_t()); return; } Execute(manager); } void CacheOpParent::Execute(Manager* aManager) @@ -139,17 +139,17 @@ void CacheOpParent::OnPrincipalVerified(nsresult aRv, ManagerId* aManagerId) { NS_ASSERT_OWNINGTHREAD(CacheOpParent); mVerifier->RemoveListener(this); mVerifier = nullptr; if (NS_WARN_IF(NS_FAILED(aRv))) { - unused << Send__delete__(this, ErrorResult(aRv), void_t()); + Unused << Send__delete__(this, ErrorResult(aRv), void_t()); return; } Execute(aManagerId); } void CacheOpParent::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult, @@ -160,17 +160,17 @@ CacheOpParent::OnOpComplete(ErrorResult& { NS_ASSERT_OWNINGTHREAD(CacheOpParent); MOZ_ASSERT(mIpcManager); MOZ_ASSERT(mManager); // Never send an op-specific result if we have an error. Instead, send // void_t() to ensure that we don't leak actors on the child side. if (NS_WARN_IF(aRv.Failed())) { - unused << Send__delete__(this, aRv, void_t()); + Unused << Send__delete__(this, aRv, void_t()); aRv.SuppressException(); // We serialiazed it, as best we could. return; } // The result must contain the appropriate type at this point. It may // or may not contain the additional result data yet. For types that // do not need special processing, it should already be set. If the // result requires actor-specific operations, then we do that below. @@ -185,17 +185,17 @@ CacheOpParent::OnOpComplete(ErrorResult& for (uint32_t i = 0; i < aSavedResponseList.Length(); ++i) { result.Add(aSavedResponseList[i], aStreamList); } for (uint32_t i = 0; i < aSavedRequestList.Length(); ++i) { result.Add(aSavedRequestList[i], aStreamList); } - unused << Send__delete__(this, aRv, result.SendAsOpResult()); + Unused << Send__delete__(this, aRv, result.SendAsOpResult()); } already_AddRefed<nsIInputStream> CacheOpParent::DeserializeCacheStream(const CacheReadStreamOrVoid& aStreamOrVoid) { if (aStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) { return nullptr; }
--- a/dom/cache/CachePushStreamChild.cpp +++ b/dom/cache/CachePushStreamChild.cpp @@ -187,17 +187,17 @@ CachePushStreamChild::DoRead() buffer.SetLength(expectedBytes); uint32_t bytesRead = 0; rv = mStream->Read(buffer.BeginWriting(), buffer.Length(), &bytesRead); buffer.SetLength(bytesRead); // If we read any data from the stream, send it across. if (!buffer.IsEmpty()) { - unused << SendBuffer(buffer); + Unused << SendBuffer(buffer); } if (rv == NS_BASE_STREAM_WOULD_BLOCK) { Wait(); return; } // Any other error or zero-byte read indicates end-of-stream @@ -250,14 +250,14 @@ CachePushStreamChild::OnEnd(nsresult aRv mStream->CloseWithStatus(aRv); if (aRv == NS_BASE_STREAM_CLOSED) { aRv = NS_OK; } // This will trigger an ActorDestroy() from the parent side - unused << SendClose(aRv); + Unused << SendClose(aRv); } } // namespace cache } // namespace dom } // namespace mozilla
--- a/dom/cache/CachePushStreamParent.cpp +++ b/dom/cache/CachePushStreamParent.cpp @@ -74,17 +74,17 @@ CachePushStreamParent::RecvBuffer(const return true; } bool CachePushStreamParent::RecvClose(const nsresult& aRv) { mWriter->CloseWithStatus(aRv); - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } CachePushStreamParent::CachePushStreamParent(nsIAsyncInputStream* aReader, nsIAsyncOutputStream* aWriter) : mReader(aReader) , mWriter(aWriter) {
--- a/dom/cache/CacheStorage.cpp +++ b/dom/cache/CacheStorage.cpp @@ -27,17 +27,17 @@ #include "nsIScriptSecurityManager.h" #include "nsURLParsers.h" #include "WorkerPrivate.h" namespace mozilla { namespace dom { namespace cache { -using mozilla::unused; +using mozilla::Unused; using mozilla::ErrorResult; using mozilla::dom::workers::WorkerPrivate; using mozilla::ipc::BackgroundChild; using mozilla::ipc::PBackgroundChild; using mozilla::ipc::IProtocol; using mozilla::ipc::PrincipalInfo; using mozilla::ipc::PrincipalToPrincipalInfo;
--- a/dom/cache/CacheStorageChild.cpp +++ b/dom/cache/CacheStorageChild.cpp @@ -48,17 +48,17 @@ CacheStorageChild::ClearListener() mListener = nullptr; } void CacheStorageChild::ExecuteOp(nsIGlobalObject* aGlobal, Promise* aPromise, nsISupports* aParent, const CacheOpArgs& aArgs) { mNumChildActors += 1; - unused << SendPCacheOpConstructor( + Unused << SendPCacheOpConstructor( new CacheOpChild(GetFeature(), aGlobal, aParent, aPromise), aArgs); } void CacheStorageChild::StartDestroyFromListener() { NS_ASSERT_OWNINGTHREAD(CacheStorageChild); @@ -94,17 +94,17 @@ CacheStorageChild::StartDestroy() } listener->DestroyInternal(this); // CacheStorage listener should call ClearListener() in DestroyInternal() MOZ_ASSERT(!mListener); // Start actor destruction from parent process - unused << SendTeardown(); + Unused << SendTeardown(); } void CacheStorageChild::ActorDestroy(ActorDestroyReason aReason) { NS_ASSERT_OWNINGTHREAD(CacheStorageChild); RefPtr<CacheStorage> listener = mListener; if (listener) {
--- a/dom/cache/CacheStorageParent.cpp +++ b/dom/cache/CacheStorageParent.cpp @@ -96,17 +96,17 @@ CacheStorageParent::RecvPCacheOpConstruc if (mVerifier) { MOZ_ASSERT(!mManagerId); actor->WaitForVerification(mVerifier); return true; } if (NS_WARN_IF(NS_FAILED(mVerifiedStatus))) { - unused << CacheOpParent::Send__delete__(actor, ErrorResult(mVerifiedStatus), + Unused << CacheOpParent::Send__delete__(actor, ErrorResult(mVerifiedStatus), void_t()); return true; } MOZ_ASSERT(mManagerId); actor->Execute(mManagerId); return true; }
--- a/dom/cache/CacheStreamControlChild.cpp +++ b/dom/cache/CacheStreamControlChild.cpp @@ -96,17 +96,17 @@ void CacheStreamControlChild::SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray<FileDescriptor>& aFds) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlChild); PFileDescriptorSetChild* fdSet = nullptr; if (!aFds.IsEmpty()) { fdSet = Manager()->SendPFileDescriptorSetConstructor(aFds[0]); for (uint32_t i = 1; i < aFds.Length(); ++i) { - unused << fdSet->SendAddFileDescriptor(aFds[i]); + Unused << fdSet->SendAddFileDescriptor(aFds[i]); } } if (fdSet) { aReadStreamOut->fds() = fdSet; } else { aReadStreamOut->fds() = void_t(); } @@ -123,24 +123,24 @@ CacheStreamControlChild::DeserializeFds( auto fdSetActor = static_cast<FileDescriptorSetChild*>( aReadStream.fds().get_PFileDescriptorSetChild()); MOZ_ASSERT(fdSetActor); fdSetActor->ForgetFileDescriptors(aFdsOut); MOZ_ASSERT(!aFdsOut.IsEmpty()); - unused << fdSetActor->Send__delete__(fdSetActor); + Unused << fdSetActor->Send__delete__(fdSetActor); } void CacheStreamControlChild::NoteClosedAfterForget(const nsID& aId) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlChild); - unused << SendNoteClosed(aId); + Unused << SendNoteClosed(aId); // A stream has closed. If we delayed StartDestry() due to this stream // being read, then we should check to see if any of the remaining streams // are active. If none of our other streams have been read, then we can // proceed with the shutdown now. if (mDestroyDelayed && !HasEverBeenRead()) { mDestroyDelayed = false; RecvCloseAll();
--- a/dom/cache/CacheStreamControlParent.cpp +++ b/dom/cache/CacheStreamControlParent.cpp @@ -56,17 +56,17 @@ void CacheStreamControlParent::SerializeFds(CacheReadStream* aReadStreamOut, const nsTArray<FileDescriptor>& aFds) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); PFileDescriptorSetParent* fdSet = nullptr; if (!aFds.IsEmpty()) { fdSet = Manager()->SendPFileDescriptorSetConstructor(aFds[0]); for (uint32_t i = 1; i < aFds.Length(); ++i) { - unused << fdSet->SendAddFileDescriptor(aFds[i]); + Unused << fdSet->SendAddFileDescriptor(aFds[i]); } } if (fdSet) { aReadStreamOut->fds() = fdSet; } else { aReadStreamOut->fds() = void_t(); } @@ -136,25 +136,25 @@ CacheStreamControlParent::SetStreamList( mStreamList = aStreamList; } void CacheStreamControlParent::Close(const nsID& aId) { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); NotifyClose(aId); - unused << SendClose(aId); + Unused << SendClose(aId); } void CacheStreamControlParent::CloseAll() { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); NotifyCloseAll(); - unused << SendCloseAll(); + Unused << SendCloseAll(); } void CacheStreamControlParent::Shutdown() { NS_ASSERT_OWNINGTHREAD(CacheStreamControlParent); if (!Send__delete__(this)) { // child process is gone, allow actor to be destroyed normally
--- a/dom/cache/FileUtils.cpp +++ b/dom/cache/FileUtils.cpp @@ -182,17 +182,17 @@ BodyStartWriteStream(const QuotaInfo& aQ // static void BodyCancelWrite(nsIFile* aBaseDir, nsISupports* aCopyContext) { MOZ_ASSERT(aBaseDir); MOZ_ASSERT(aCopyContext); nsresult rv = NS_CancelAsyncCopy(aCopyContext, NS_ERROR_ABORT); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); // The partially written file must be cleaned up after the async copy // makes its callback. } // static nsresult BodyFinalizeWrite(nsIFile* aBaseDir, const nsID& aId)
--- a/dom/cache/Manager.cpp +++ b/dom/cache/Manager.cpp @@ -133,17 +133,17 @@ public: rv = dbDir->Append(NS_LITERAL_STRING("cache")); if (NS_WARN_IF(NS_FAILED(rv))) { aResolver->Resolve(rv); return; } rv = BodyDeleteFiles(dbDir, mDeletedBodyIdList); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); aResolver->Resolve(rv); } private: nsTArray<nsID> mDeletedBodyIdList; }; @@ -892,17 +892,17 @@ private: mDeletedBodyIdList); if (NS_WARN_IF(NS_FAILED(rv))) { DoResolve(rv); return; } } rv = trans.Commit(); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); DoResolve(rv); } virtual void CompleteOnInitiatingThread(nsresult aRv) override { NS_ASSERT_OWNINGTHREAD(Action);
--- a/dom/cache/ReadStream.cpp +++ b/dom/cache/ReadStream.cpp @@ -15,17 +15,17 @@ #include "mozilla/SnappyUncompressInputStream.h" #include "nsIAsyncInputStream.h" #include "nsTArray.h" namespace mozilla { namespace dom { namespace cache { -using mozilla::unused; +using mozilla::Unused; using mozilla::ipc::FileDescriptor; // ---------------------------------------------------------------------------- // The inner stream class. This is where all of the real work is done. As // an invariant Inner::Close() must be called before ~Inner(). This is // guaranteed by our outer ReadStream class. class ReadStream::Inner final : public ReadStream::Controllable
--- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -73,17 +73,17 @@ SerializeNormalStream(nsIInputStream* aS PFileDescriptorSetChild* fdSet = nullptr; if (!fds.IsEmpty()) { // We should not be serializing until we have an actor ready PBackgroundChild* manager = BackgroundChild::GetForCurrentThread(); MOZ_ASSERT(manager); fdSet = manager->SendPFileDescriptorSetConstructor(fds[0]); for (uint32_t i = 1; i < fds.Length(); ++i) { - unused << fdSet->SendAddFileDescriptor(fds[i]); + Unused << fdSet->SendAddFileDescriptor(fds[i]); } } if (fdSet) { aReadStreamOut.fds() = fdSet; } else { aReadStreamOut.fds() = void_t(); }
--- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -1021,17 +1021,17 @@ CanvasRenderingContext2D::ParseColor(con nsCOMPtr<nsIPresShell> presShell = GetPresShell(); RefPtr<nsStyleContext> parentContext; if (mCanvasElement && mCanvasElement->IsInDoc()) { // Inherit from the canvas element. parentContext = nsComputedDOMStyle::GetStyleContextForElement( mCanvasElement, nullptr, presShell); } - unused << nsRuleNode::ComputeColor( + Unused << nsRuleNode::ComputeColor( value, presShell ? presShell->GetPresContext() : nullptr, parentContext, *aColor); } return true; } nsresult CanvasRenderingContext2D::Reset() @@ -4883,17 +4883,17 @@ CanvasRenderingContext2D::DrawWindow(nsG return; } thebes = new gfxContext(drawDT); thebes->SetMatrix(gfxMatrix::Scaling(matrix._11, matrix._22)); } nsCOMPtr<nsIPresShell> shell = presContext->PresShell(); - unused << shell->RenderDocument(r, renderDocFlags, backgroundColor, thebes); + Unused << shell->RenderDocument(r, renderDocFlags, backgroundColor, thebes); if (drawDT) { RefPtr<SourceSurface> snapshot = drawDT->Snapshot(); RefPtr<DataSourceSurface> data = snapshot->GetDataSurface(); DataSourceSurface::MappedSurface rawData; if (NS_WARN_IF(!data->Map(DataSourceSurface::READ, &rawData))) { error.Throw(NS_ERROR_FAILURE); return;
--- a/dom/datastore/DataStoreService.cpp +++ b/dom/datastore/DataStoreService.cpp @@ -1321,17 +1321,17 @@ DataStoreService::EnableDataStore(uint32 } // Notify the child processes. if (XRE_IsParentProcess()) { nsTArray<ContentParent*> children; ContentParent::GetAll(children); for (uint32_t i = 0; i < children.Length(); i++) { if (children[i]->NeedsDataStoreInfos()) { - unused << children[i]->SendDataStoreNotify(aAppId, nsAutoString(aName), + Unused << children[i]->SendDataStoreNotify(aAppId, nsAutoString(aName), nsAutoString(aManifestURL)); } } } // Maybe we have some pending request waiting for this DataStore. PendingRequests* requests; if (!mPendingRequests.Get(aName, &requests)) {
--- a/dom/devicestorage/DeviceStorageRequestParent.cpp +++ b/dom/devicestorage/DeviceStorageRequestParent.cpp @@ -410,17 +410,17 @@ DeviceStorageRequestParent::PostFreeSpac DeviceStorageRequestParent::PostFreeSpaceResultEvent:: ~PostFreeSpaceResultEvent() {} nsresult DeviceStorageRequestParent::PostFreeSpaceResultEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); FreeSpaceStorageResponse response(mFreeSpace); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostUsedSpaceResultEvent:: PostUsedSpaceResultEvent(DeviceStorageRequestParent* aParent, const nsAString& aType, uint64_t aUsedSpace) : CancelableRunnable(aParent) @@ -432,17 +432,17 @@ DeviceStorageRequestParent::PostUsedSpac DeviceStorageRequestParent::PostUsedSpaceResultEvent:: ~PostUsedSpaceResultEvent() {} nsresult DeviceStorageRequestParent::PostUsedSpaceResultEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); UsedSpaceStorageResponse response(mUsedSpace); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostErrorEvent:: PostErrorEvent(DeviceStorageRequestParent* aParent, const char* aError) : CancelableRunnable(aParent) { CopyASCIItoUTF16(aError, mError); @@ -450,34 +450,34 @@ DeviceStorageRequestParent::PostErrorEve DeviceStorageRequestParent::PostErrorEvent::~PostErrorEvent() {} nsresult DeviceStorageRequestParent::PostErrorEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); ErrorResponse response(mError); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostSuccessEvent:: PostSuccessEvent(DeviceStorageRequestParent* aParent) : CancelableRunnable(aParent) { } DeviceStorageRequestParent::PostSuccessEvent::~PostSuccessEvent() {} nsresult DeviceStorageRequestParent::PostSuccessEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); SuccessResponse response; - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostBlobSuccessEvent:: PostBlobSuccessEvent(DeviceStorageRequestParent* aParent, DeviceStorageFile* aFile, uint32_t aLength, nsACString& aMimeType, @@ -504,24 +504,24 @@ DeviceStorageRequestParent::PostBlobSucc RefPtr<BlobImpl> blob = new BlobImplFile(fullPath, mime, mLength, mFile->mFile, mLastModificationDate); ContentParent* cp = static_cast<ContentParent*>(mParent->Manager()); BlobParent* actor = cp->GetOrCreateActorForBlobImpl(blob); if (!actor) { ErrorResponse response(NS_LITERAL_STRING(POST_ERROR_EVENT_UNKNOWN)); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } BlobResponse response; response.blobParent() = actor; - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostEnumerationSuccessEvent:: PostEnumerationSuccessEvent(DeviceStorageRequestParent* aParent, const nsAString& aStorageType, const nsAString& aRelPath, InfallibleTArray<DeviceStorageFileValue>& aPaths) @@ -535,17 +535,17 @@ DeviceStorageRequestParent::PostEnumerat DeviceStorageRequestParent::PostEnumerationSuccessEvent:: ~PostEnumerationSuccessEvent() {} nsresult DeviceStorageRequestParent::PostEnumerationSuccessEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); EnumerationResponse response(mStorageType, mRelPath, mPaths); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::CreateFdEvent:: CreateFdEvent(DeviceStorageRequestParent* aParent, DeviceStorageFile* aFile) : CancelableRunnable(aParent) , mFile(aFile) @@ -862,17 +862,17 @@ DeviceStorageRequestParent::PostPathResu } nsresult DeviceStorageRequestParent::PostPathResultEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); SuccessResponse response; - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostFileDescriptorResultEvent:: PostFileDescriptorResultEvent(DeviceStorageRequestParent* aParent, const FileDescriptor& aFileDescriptor) : CancelableRunnable(aParent) , mFileDescriptor(aFileDescriptor) @@ -885,17 +885,17 @@ DeviceStorageRequestParent::PostFileDesc } nsresult DeviceStorageRequestParent::PostFileDescriptorResultEvent::CancelableRun() { MOZ_ASSERT(NS_IsMainThread()); FileDescriptorResponse response(mFileDescriptor); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostFormatResultEvent:: PostFormatResultEvent(DeviceStorageRequestParent* aParent, DeviceStorageFile* aFile) : CancelableRunnable(aParent) , mFile(aFile) @@ -913,17 +913,17 @@ DeviceStorageRequestParent::PostFormatRe MOZ_ASSERT(NS_IsMainThread()); nsString state = NS_LITERAL_STRING("unavailable"); if (mFile) { mFile->DoFormat(state); } FormatStorageResponse response(state); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostMountResultEvent:: PostMountResultEvent(DeviceStorageRequestParent* aParent, DeviceStorageFile* aFile) : CancelableRunnable(aParent) , mFile(aFile) @@ -941,17 +941,17 @@ DeviceStorageRequestParent::PostMountRes MOZ_ASSERT(NS_IsMainThread()); nsString state = NS_LITERAL_STRING("unavailable"); if (mFile) { mFile->DoMount(state); } MountStorageResponse response(state); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } DeviceStorageRequestParent::PostUnmountResultEvent:: PostUnmountResultEvent(DeviceStorageRequestParent* aParent, DeviceStorageFile* aFile) : CancelableRunnable(aParent) , mFile(aFile) @@ -969,15 +969,15 @@ DeviceStorageRequestParent::PostUnmountR MOZ_ASSERT(NS_IsMainThread()); nsString state = NS_LITERAL_STRING("unavailable"); if (mFile) { mFile->DoUnmount(state); } UnmountStorageResponse response(state); - unused << mParent->Send__delete__(mParent, response); + Unused << mParent->Send__delete__(mParent, response); return NS_OK; } } // namespace devicestorage } // namespace dom } // namespace mozilla
--- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -250,17 +250,17 @@ EventTargetChainItem::EventTargetChainIt { MOZ_ASSERT(!aTarget || mTarget == aTarget->GetTargetForEventTargetChain()); } void EventTargetChainItem::PreHandleEvent(EventChainPreVisitor& aVisitor) { aVisitor.Reset(); - unused << mTarget->PreHandleEvent(aVisitor); + Unused << mTarget->PreHandleEvent(aVisitor); SetForceContentDispatch(aVisitor.mForceContentDispatch); SetWantsWillHandleEvent(aVisitor.mWantsWillHandleEvent); SetMayHaveListenerManager(aVisitor.mMayHaveListenerManager); mItemFlags = aVisitor.mItemFlags; mItemData = aVisitor.mItemData; } void
--- a/dom/events/IMEStateManager.cpp +++ b/dom/events/IMEStateManager.cpp @@ -412,17 +412,17 @@ IMEStateManager::OnChangeFocusInternal(n sActiveTabParent ? sActiveTabParent->Manager() : nullptr; nsIContentParent* newContentParent = newTabParent ? newTabParent->Manager() : nullptr; if (sActiveTabParent && currentContentParent != newContentParent) { MOZ_LOG(sISMLog, LogLevel::Debug, ("ISM: IMEStateManager::OnChangeFocusInternal(), notifying previous " "focused child process of parent process or another child process " "getting focus")); - unused << sActiveTabParent->SendStopIMEStateManagement(); + Unused << sActiveTabParent->SendStopIMEStateManagement(); } nsCOMPtr<nsIWidget> widget = (sPresContext == aPresContext) ? oldWidget.get() : aPresContext->GetRootWidget(); if (NS_WARN_IF(!widget)) { MOZ_LOG(sISMLog, LogLevel::Error, ("ISM: IMEStateManager::OnChangeFocusInternal(), FAILED due to " @@ -440,17 +440,17 @@ IMEStateManager::OnChangeFocusInternal(n if (newTabParent) { if (aAction.mFocusChange == InputContextAction::MENU_GOT_PSEUDO_FOCUS || aAction.mFocusChange == InputContextAction::MENU_LOST_PSEUDO_FOCUS) { // XXX When menu keyboard listener is being uninstalled, IME state needs // to be restored by the child process asynchronously. Therefore, // some key events which are fired immediately after closing menu // may not be handled by IME. - unused << newTabParent-> + Unused << newTabParent-> SendMenuKeyboardListenerInstalled(sInstalledMenuKeyboardListener); setIMEState = sInstalledMenuKeyboardListener; } else if (focusActuallyChanging) { InputContext context = widget->GetInputContext(); if (context.mIMEState.mEnabled == IMEState::DISABLED) { setIMEState = false; MOZ_LOG(sISMLog, LogLevel::Debug, ("ISM: IMEStateManager::OnChangeFocusInternal(), doesn't set IME "
--- a/dom/events/TextComposition.cpp +++ b/dom/events/TextComposition.cpp @@ -135,17 +135,17 @@ TextComposition::OnCompositionEventDisca // Note that this method is never called for synthesized events for emulating // commit or cancel composition. MOZ_ASSERT(aCompositionEvent->mFlags.mIsTrusted, "Shouldn't be called with untrusted event"); if (mTabParent) { // The composition event should be discarded in the child process too. - unused << mTabParent->SendCompositionEvent(*aCompositionEvent); + Unused << mTabParent->SendCompositionEvent(*aCompositionEvent); } // XXX If composition events are discarded, should we dispatch them with // runnable event? However, even if we do so, it might make native IME // confused due to async modification. Especially when native IME is // TSF. if (!aCompositionEvent->CausesDOMCompositionEndEvent()) { return; @@ -213,17 +213,17 @@ TextComposition::DispatchCompositionEven WidgetCompositionEvent* aCompositionEvent, nsEventStatus* aStatus, EventDispatchingCallback* aCallBack, bool aIsSynthesized) { // If the content is a container of TabParent, composition should be in the // remote process. if (mTabParent) { - unused << mTabParent->SendCompositionEvent(*aCompositionEvent); + Unused << mTabParent->SendCompositionEvent(*aCompositionEvent); aCompositionEvent->mFlags.mPropagationStopped = true; if (aCompositionEvent->CausesDOMTextEvent()) { mLastData = aCompositionEvent->mData; // Although, the composition event hasn't been actually handled yet, // emulate an editor to be handling the composition event. EditorWillHandleCompositionChangeEvent(aCompositionEvent); EditorDidHandleCompositionChangeEvent(); } @@ -381,17 +381,17 @@ TextComposition::DispatchCompositionEven void TextComposition::HandleSelectionEvent(nsPresContext* aPresContext, TabParent* aTabParent, WidgetSelectionEvent* aSelectionEvent) { // If the content is a container of TabParent, composition should be in the // remote process. if (aTabParent) { - unused << aTabParent->SendSelectionEvent(*aSelectionEvent); + Unused << aTabParent->SendSelectionEvent(*aSelectionEvent); aSelectionEvent->mFlags.mPropagationStopped = true; return; } ContentEventHandler handler(aPresContext); AutoRestore<bool> saveHandlingSelectionEvent(sHandlingSelectionEvent); sHandlingSelectionEvent = true; // XXX During setting selection, a selection listener may change selection
--- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -776,18 +776,18 @@ FetchDriver::AsyncOnChannelRedirect(nsIC // // Therefore simulate the completion of the channel to produce the // opaqueredirect Response and then cancel the original channel. This // will result in OnStartRequest() getting called twice, but the second // time will be with an error response (from the Cancel) which will // be ignored. MOZ_ASSERT(!mFoundOpaqueRedirect); mFoundOpaqueRedirect = true; - unused << OnStartRequest(aOldChannel, nullptr); - unused << OnStopRequest(aOldChannel, nullptr, NS_OK); + Unused << OnStartRequest(aOldChannel, nullptr); + Unused << OnStopRequest(aOldChannel, nullptr, NS_OK); aOldChannel->Cancel(NS_BINDING_FAILED); return NS_BINDING_FAILED; } // The following steps are from HTTP Fetch step 5, "redirect status", step 11 // which requires the RequestRedirect to be "follow".
--- a/dom/fetch/Request.cpp +++ b/dom/fetch/Request.cpp @@ -104,17 +104,17 @@ GetRequestURLFromDocument(nsIDocument* a if (NS_WARN_IF(aRv.Failed())) { aRv.ThrowTypeError<MSG_INVALID_URL>(&aInput); return; } // This fails with URIs with weird protocols, even when they are valid, // so we ignore the failure nsAutoCString credentials; - unused << resolvedURI->GetUserPass(credentials); + Unused << resolvedURI->GetUserPass(credentials); if (!credentials.IsEmpty()) { aRv.ThrowTypeError<MSG_URL_HAS_CREDENTIALS>(&aInput); return; } nsCOMPtr<nsIURI> resolvedURIClone; // We use CloneIgnoringRef to strip away the fragment even if the original URI // is immutable. @@ -143,17 +143,17 @@ GetRequestURLFromChrome(const nsAString& if (NS_WARN_IF(aRv.Failed())) { aRv.ThrowTypeError<MSG_INVALID_URL>(&aInput); return; } // This fails with URIs with weird protocols, even when they are valid, // so we ignore the failure nsAutoCString credentials; - unused << uri->GetUserPass(credentials); + Unused << uri->GetUserPass(credentials); if (!credentials.IsEmpty()) { aRv.ThrowTypeError<MSG_URL_HAS_CREDENTIALS>(&aInput); return; } nsCOMPtr<nsIURI> uriClone; // We use CloneIgnoringRef to strip away the fragment even if the original URI // is immutable.
--- a/dom/filehandle/ActorsParent.cpp +++ b/dom/filehandle/ActorsParent.cpp @@ -998,17 +998,17 @@ FileHandleThreadPool::Cleanup() for (uint32_t count = mCompleteCallbacks.Length(), index = 0; index < count; index++) { nsAutoPtr<StoragesCompleteCallback> completeCallback( mCompleteCallbacks[index].forget()); MOZ_ASSERT(completeCallback); MOZ_ASSERT(completeCallback->mCallback); - unused << completeCallback->mCallback->Run(); + Unused << completeCallback->mCallback->Run(); } mCompleteCallbacks.Clear(); // And make sure they get processed. nsIThread* currentThread = NS_GetCurrentThread(); MOZ_ASSERT(currentThread); @@ -1646,17 +1646,17 @@ FileHandle::Invalidate() } void FileHandle::SendCompleteNotification(bool aAborted) { AssertIsOnBackgroundThread(); if (!IsActorDestroyed()) { - unused << SendComplete(aAborted); + Unused << SendComplete(aAborted); } } bool FileHandle::VerifyRequestParams(const FileRequestParams& aParams) const { AssertIsOnBackgroundThread(); MOZ_ASSERT(aParams.type() != FileRequestParams::T__None); @@ -2275,17 +2275,17 @@ CopyFileHandleOp::Cleanup() } NS_IMETHODIMP CopyFileHandleOp:: ProgressRunnable::Run() { AssertIsOnBackgroundThread(); - unused << mCopyFileHandleOp->SendProgress(mProgress, mProgressMax); + Unused << mCopyFileHandleOp->SendProgress(mProgress, mProgressMax); mCopyFileHandleOp = nullptr; return NS_OK; } GetMetadataOp::GetMetadataOp(FileHandle* aFileHandle, const FileRequestParams& aParams)
--- a/dom/filesystem/FileSystemTaskBase.cpp +++ b/dom/filesystem/FileSystemTaskBase.cpp @@ -106,17 +106,17 @@ FileSystemTaskBase::Run() void FileSystemTaskBase::HandleResult() { MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!"); if (mFileSystem->IsShutdown()) { return; } if (mRequestParent && mRequestParent->IsRunning()) { - unused << mRequestParent->Send__delete__(mRequestParent, + Unused << mRequestParent->Send__delete__(mRequestParent, GetRequestResult()); } else { HandlerCallback(); } } FileSystemResponseValue FileSystemTaskBase::GetRequestResult() const
--- a/dom/fmradio/ipc/FMRadioParent.cpp +++ b/dom/fmradio/ipc/FMRadioParent.cpp @@ -93,59 +93,59 @@ FMRadioParent::DeallocPFMRadioRequestPar return true; } void FMRadioParent::Notify(const FMRadioEventType& aType) { switch (aType) { case FrequencyChanged: - unused << SendNotifyFrequencyChanged( + Unused << SendNotifyFrequencyChanged( IFMRadioService::Singleton()->GetFrequency()); break; case EnabledChanged: - unused << SendNotifyEnabledChanged( + Unused << SendNotifyEnabledChanged( IFMRadioService::Singleton()->IsEnabled(), IFMRadioService::Singleton()->GetFrequency()); break; case RDSEnabledChanged: - unused << SendNotifyRDSEnabledChanged( + Unused << SendNotifyRDSEnabledChanged( IFMRadioService::Singleton()->IsRDSEnabled()); break; case PIChanged: { Nullable<unsigned short> pi = IFMRadioService::Singleton()->GetPi(); - unused << SendNotifyPIChanged(!pi.IsNull(), + Unused << SendNotifyPIChanged(!pi.IsNull(), pi.IsNull() ? 0 : pi.Value()); break; } case PTYChanged: { Nullable<uint8_t> pty = IFMRadioService::Singleton()->GetPty(); - unused << SendNotifyPTYChanged(!pty.IsNull(), + Unused << SendNotifyPTYChanged(!pty.IsNull(), pty.IsNull() ? 0 : pty.Value()); break; } case PSChanged: { nsAutoString psname; IFMRadioService::Singleton()->GetPs(psname); - unused << SendNotifyPSChanged(psname); + Unused << SendNotifyPSChanged(psname); break; } case RadiotextChanged: { nsAutoString radiotext; IFMRadioService::Singleton()->GetRt(radiotext); - unused << SendNotifyRadiotextChanged(radiotext); + Unused << SendNotifyRadiotextChanged(radiotext); break; } case NewRDSGroup: { uint64_t group; DebugOnly<bool> rdsgroupset = IFMRadioService::Singleton()->GetRdsgroup(group); MOZ_ASSERT(rdsgroupset); - unused << SendNotifyNewRDSGroup(group); + Unused << SendNotifyNewRDSGroup(group); break; } default: NS_RUNTIMEABORT("not reached"); break; } }
--- a/dom/fmradio/ipc/FMRadioRequestParent.cpp +++ b/dom/fmradio/ipc/FMRadioRequestParent.cpp @@ -29,16 +29,16 @@ FMRadioRequestParent::ActorDestroy(Actor } nsresult FMRadioRequestParent::Run() { MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!"); if (!mActorDestroyed) { - unused << Send__delete__(this, mResponseType); + Unused << Send__delete__(this, mResponseType); } return NS_OK; } END_FMRADIO_NAMESPACE
--- a/dom/gamepad/GamepadFunctions.cpp +++ b/dom/gamepad/GamepadFunctions.cpp @@ -24,17 +24,17 @@ void NotifyGamepadChange(const T& aInfo) { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(XRE_IsParentProcess()); GamepadChangeEvent e(aInfo); nsTArray<ContentParent*> t; ContentParent::GetAll(t); for(uint32_t i = 0; i < t.Length(); ++i) { - unused << t[i]->SendGamepadUpdate(e); + Unused << t[i]->SendGamepadUpdate(e); } // If we have a GamepadService in the main process, send directly to it. if (GamepadService::IsServiceRunning()) { RefPtr<GamepadService> svc = GamepadService::GetService(); svc->Update(e); } }
--- a/dom/geolocation/nsGeolocation.cpp +++ b/dom/geolocation/nsGeolocation.cpp @@ -58,17 +58,17 @@ class nsIPrincipal; // Some limit to the number of get or watch geolocation requests // that a window can make. #define MAX_GEO_REQUESTS_PER_WINDOW 1500 // the geolocation enabled setting #define GEO_SETTINGS_ENABLED "geolocation.enabled" -using mozilla::unused; // <snicker> +using mozilla::Unused; // <snicker> using namespace mozilla; using namespace mozilla::dom; class nsGeolocationRequest final : public nsIContentPermissionRequest , public nsITimerCallback , public nsIGeolocationUpdate { @@ -1271,17 +1271,17 @@ Geolocation::HighAccuracyRequested() void Geolocation::RemoveRequest(nsGeolocationRequest* aRequest) { bool requestWasKnown = (mPendingCallbacks.RemoveElement(aRequest) != mWatchingCallbacks.RemoveElement(aRequest)); - unused << requestWasKnown; + Unused << requestWasKnown; } NS_IMETHODIMP Geolocation::Update(nsIDOMGeoPosition *aSomewhere) { if (!WindowOwnerStillExists()) { Shutdown(); return NS_OK;
--- a/dom/geolocation/nsGeolocationSettings.cpp +++ b/dom/geolocation/nsGeolocationSettings.cpp @@ -32,17 +32,17 @@ #include "nsJSUtils.h" #include "prdtoa.h" #define GEO_ALA_TYPE_VALUE_PRECISE "precise" #define GEO_ALA_TYPE_VALUE_APPROX "blur" #define GEO_ALA_TYPE_VALUE_FIXED "user-defined" #define GEO_ALA_TYPE_VALUE_NONE "no-location" -using mozilla::unused; +using mozilla::Unused; using namespace mozilla; using namespace mozilla::dom; NS_IMPL_ISUPPORTS(nsGeolocationSettings, nsIObserver) StaticRefPtr<nsGeolocationSettings> nsGeolocationSettings::sSettings; already_AddRefed<nsGeolocationSettings>
--- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -5308,17 +5308,17 @@ public: Dispatch(uint64_t aTransactionId, nsIRunnable* aRunnable); void Finish(uint64_t aTransactionId, FinishCallback* aCallback); void CloseDatabaseWhenIdle(const nsACString& aDatabaseId) { - unused << CloseDatabaseWhenIdleInternal(aDatabaseId); + Unused << CloseDatabaseWhenIdleInternal(aDatabaseId); } void WaitForDatabasesToComplete(nsTArray<nsCString>&& aDatabaseIds, nsIRunnable* aCallback); void Shutdown(); @@ -9587,17 +9587,17 @@ RecvPIndexedDBPermissionRequestConstruct PermissionRequestBase::PermissionValue permission; nsresult rv = actor->PromptIfNeeded(&permission); if (NS_FAILED(rv)) { return false; } if (permission != PermissionRequestBase::kPermissionPrompt) { - unused << + Unused << PIndexedDBPermissionRequestParent::Send__delete__(actor, permission); } return true; } bool DeallocPIndexedDBPermissionRequestParent( @@ -9845,17 +9845,17 @@ DatabaseConnection::RollbackWriteTransac DatabaseConnection::CachedStatement stmt; nsresult rv = GetCachedStatement(NS_LITERAL_CSTRING("ROLLBACK;"), &stmt); if (NS_WARN_IF(NS_FAILED(rv))) { return; } // This may fail if SQLite already rolled back the transaction so ignore any // errors. - unused << stmt->Execute(); + Unused << stmt->Execute(); mInWriteTransaction = false; } void DatabaseConnection::FinishWriteTransaction() { AssertIsOnConnectionThread(); @@ -9973,17 +9973,17 @@ DatabaseConnection::RollbackSavepoint() NS_LITERAL_CSTRING("ROLLBACK TO " SAVEPOINT_CLAUSE), &stmt); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } // This may fail if SQLite already rolled back the savepoint so ignore any // errors. - unused << stmt->Execute(); + Unused << stmt->Execute(); return NS_OK; } nsresult DatabaseConnection::CheckpointInternal(CheckpointMode aMode) { AssertIsOnConnectionThread(); @@ -10063,17 +10063,17 @@ DatabaseConnection::DoIdleProcessing(boo rv = GetCachedStatement(NS_LITERAL_CSTRING("BEGIN;"), &beginStmt); if (NS_WARN_IF(NS_FAILED(rv))) { return; } // Release the connection's normal transaction. It's possible that it could // fail, but that isn't a problem here. - unused << rollbackStmt->Execute(); + Unused << rollbackStmt->Execute(); mInReadTransaction = false; } bool freedSomePages = false; if (freelistCount) { rv = ReclaimFreePagesWhileIdle(freelistStmt, @@ -10088,17 +10088,17 @@ DatabaseConnection::DoIdleProcessing(boo // Make sure we didn't leave a transaction running. MOZ_ASSERT(!mInReadTransaction); MOZ_ASSERT(!mInWriteTransaction); } // Truncate the WAL if we were asked to or if we managed to free some space. if (aNeedsCheckpoint || freedSomePages) { rv = CheckpointInternal(CheckpointMode::Truncate); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); } // Finally try to restart the read transaction if we rolled it back earlier. if (beginStmt) { rv = beginStmt->Execute(); if (NS_SUCCEEDED(rv)) { mInReadTransaction = true; } else { @@ -10214,17 +10214,17 @@ DatabaseConnection::ReclaimFreePagesWhil NS_WARNING("Failed to commit!"); } } if (NS_FAILED(rv)) { MOZ_ASSERT(mInWriteTransaction); // Something failed, make sure we roll everything back. - unused << aRollbackStatement->Execute(); + Unused << aRollbackStatement->Execute(); mInWriteTransaction = false; return rv; } *aFreedSomePages = freedSomePages; return NS_OK; @@ -11182,17 +11182,17 @@ ConnectionPool::Start(const nsID& aBackg blockInfo->mLastBlockingReads = transactionInfo; blockInfo->mLastBlockingWrites.Clear(); } else { blockInfo->mLastBlockingWrites.AppendElement(transactionInfo); } } if (!transactionInfo->mBlockedOn.Count()) { - unused << ScheduleTransaction(transactionInfo, + Unused << ScheduleTransaction(transactionInfo, /* aFromQueuedTransactions */ false); } if (!databaseInfoIsNew && mIdleDatabases.RemoveElement(dbInfo)) { AdjustIdleTimer(); } return transactionId; @@ -11275,17 +11275,17 @@ ConnectionPool::WaitForDatabasesToComple MOZ_ASSERT(!databaseId.IsEmpty()); if (CloseDatabaseWhenIdleInternal(databaseId)) { mayRunCallbackImmediately = false; } } if (mayRunCallbackImmediately) { - unused << aCallback->Run(); + Unused << aCallback->Run(); return; } nsAutoPtr<DatabasesCompleteCallback> callback( new DatabasesCompleteCallback(Move(aDatabaseIds), aCallback)); mCompleteCallbacks.AppendElement(callback.forget()); } @@ -11347,17 +11347,17 @@ ConnectionPool::Cleanup() for (uint32_t count = mCompleteCallbacks.Length(), index = 0; index < count; index++) { nsAutoPtr<DatabasesCompleteCallback> completeCallback( mCompleteCallbacks[index].forget()); MOZ_ASSERT(completeCallback); MOZ_ASSERT(completeCallback->mCallback); - unused << completeCallback->mCallback->Run(); + Unused << completeCallback->mCallback->Run(); } mCompleteCallbacks.Clear(); // And make sure they get processed. nsIThread* currentThread = NS_GetCurrentThread(); MOZ_ASSERT(currentThread); @@ -11873,17 +11873,17 @@ ConnectionPool::NoteClosedDatabase(Datab nsTArray<TransactionInfo*>& scheduledTransactions = aDatabaseInfo->mTransactionsScheduledDuringClose; MOZ_ASSERT(!scheduledTransactions.IsEmpty()); for (uint32_t index = 0, count = scheduledTransactions.Length(); index < count; index++) { - unused << ScheduleTransaction(scheduledTransactions[index], + Unused << ScheduleTransaction(scheduledTransactions[index], /* aFromQueuedTransactions */ false); } scheduledTransactions.Clear(); return; } @@ -11938,17 +11938,17 @@ ConnectionPool::MaybeFireCallback(Databa const nsCString& databaseId = aCallback->mDatabaseIds[index]; MOZ_ASSERT(!databaseId.IsEmpty()); if (mDatabases.Get(databaseId)) { return false; } } - unused << aCallback->mCallback->Run(); + Unused << aCallback->mCallback->Run(); return true; } void ConnectionPool::PerformIdleDatabaseMaintenance(DatabaseInfo* aDatabaseInfo) { AssertIsOnOwningThread(); MOZ_ASSERT(aDatabaseInfo); @@ -12217,17 +12217,17 @@ FinishCallbackWrapper::Run() "ConnectionPool::FinishCallbackWrapper::Run", js::ProfileEntry::Category::STORAGE); if (!mHasRunOnce) { MOZ_ASSERT(!IsOnBackgroundThread()); mHasRunOnce = true; - unused << mCallback->Run(); + Unused << mCallback->Run(); MOZ_ALWAYS_TRUE(NS_SUCCEEDED( mOwningThread->Dispatch(this, NS_DISPATCH_NORMAL))); return NS_OK; } mConnectionPool->AssertIsOnOwningThread(); @@ -12515,17 +12515,17 @@ TransactionInfo::Schedule() { AssertIsOnBackgroundThread(); MOZ_ASSERT(mDatabaseInfo); ConnectionPool* connectionPool = mDatabaseInfo->mConnectionPool; MOZ_ASSERT(connectionPool); connectionPool->AssertIsOnOwningThread(); - unused << + Unused << connectionPool->ScheduleTransaction(this, /* aFromQueuedTransactions */ false); } ConnectionPool:: TransactionInfoPair::TransactionInfoPair() : mLastBlockingReads(nullptr) { @@ -12905,17 +12905,17 @@ Factory::DeallocPBackgroundIDBDatabasePa * WaitForTransactionsHelper ******************************************************************************/ void WaitForTransactionsHelper::WaitForTransactions() { MOZ_ASSERT(mState == State::Initial); - unused << this->Run(); + Unused << this->Run(); } void WaitForTransactionsHelper::MaybeWaitForTransactions() { AssertIsOnBackgroundThread(); MOZ_ASSERT(mState == State::Initial); @@ -13137,17 +13137,17 @@ Database::Invalidate() if (mInvalidated) { return; } mInvalidated = true; if (mActorWasAlive && !mActorDestroyed) { - unused << SendInvalidate(); + Unused << SendInvalidate(); } if (!Helper::InvalidateTransactions(mTransactions)) { NS_WARNING("Failed to abort all transactions!"); } if (!Helper::InvalidateMutableFiles(mMutableFiles)) { NS_WARNING("Failed to abort all mutable files!"); @@ -14743,17 +14743,17 @@ NormalTransaction::IsSameProcessActor() } void NormalTransaction::SendCompleteNotification(nsresult aResult) { AssertIsOnBackgroundThread(); if (!IsActorDestroyed()) { - unused << SendComplete(aResult); + Unused << SendComplete(aResult); } } void NormalTransaction::ActorDestroy(ActorDestroyReason aWhy) { AssertIsOnBackgroundThread(); @@ -15042,17 +15042,17 @@ VersionChangeTransaction::SendCompleteNo if (NS_FAILED(aResult) && NS_SUCCEEDED(openDatabaseOp->mResultCode)) { openDatabaseOp->mResultCode = aResult; } openDatabaseOp->mState = OpenDatabaseOp::State::SendingResults; if (!IsActorDestroyed()) { - unused << SendComplete(aResult); + Unused << SendComplete(aResult); } MOZ_ALWAYS_TRUE(NS_SUCCEEDED(openDatabaseOp->Run())); } void VersionChangeTransaction::ActorDestroy(ActorDestroyReason aWhy) { @@ -16838,17 +16838,17 @@ QuotaClient::PerformIdleMaintenance() // for low disk space mode. IndexedDatabaseManager* mgr = IndexedDatabaseManager::GetOrCreate(); if (NS_WARN_IF(!mgr)) { return; } if (kRunningXPCShellTests) { // We don't want user activity to impact this code if we're running tests. - unused << Observe(nullptr, OBSERVER_TOPIC_IDLE, nullptr); + Unused << Observe(nullptr, OBSERVER_TOPIC_IDLE, nullptr); } else if (!mIdleObserverRegistered) { nsCOMPtr<nsIIdleService> idleService = do_GetService(kIdleServiceContractId); MOZ_ASSERT(idleService); MOZ_ALWAYS_TRUE(NS_SUCCEEDED( idleService->AddIdleObserver(this, kIdleObserverTimeSec))); @@ -18004,17 +18004,17 @@ QuotaClient:: AutoProgressHandler::Unregister() { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(!IsOnBackgroundThread()); MOZ_ASSERT(mConnection); nsCOMPtr<mozIStorageProgressHandler> oldHandler; nsresult rv = mConnection->RemoveProgressHandler(getter_AddRefs(oldHandler)); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); MOZ_ASSERT_IF(NS_SUCCEEDED(rv), oldHandler == this); } NS_IMETHODIMP_(MozExternalRefCountType) QuotaClient:: AutoProgressHandler::AddRef() { @@ -20927,17 +20927,17 @@ OpenDatabaseOp::NoteDatabaseClosed(Datab void OpenDatabaseOp::SendBlockedNotification() { AssertIsOnOwningThread(); MOZ_ASSERT(mState == State::WaitingForOtherDatabasesToClose); if (!IsActorDestroyed()) { - unused << SendBlocked(mMetadata->mCommonMetadata.version()); + Unused << SendBlocked(mMetadata->mCommonMetadata.version()); } } nsresult OpenDatabaseOp::DispatchToWorkThread() { AssertIsOnOwningThread(); MOZ_ASSERT(mState == State::WaitingForTransactionsToComplete); @@ -21090,17 +21090,17 @@ OpenDatabaseOp::SendResults() // If something failed then our metadata pointer is now bad. No one should // ever touch it again though so just null it out in DEBUG builds to make // sure we find such cases. mMetadata = nullptr; #endif response = ClampResultCode(mResultCode); } - unused << + Unused << PBackgroundIDBFactoryRequestParent::Send__delete__(this, response); } if (mDatabase) { MOZ_ASSERT(!mDirectoryLock); if (NS_FAILED(mResultCode)) { mDatabase->Invalidate(); @@ -21816,17 +21816,17 @@ DeleteDatabaseOp::NoteDatabaseClosed(Dat void DeleteDatabaseOp::SendBlockedNotification() { AssertIsOnOwningThread(); MOZ_ASSERT(mState == State::WaitingForOtherDatabasesToClose); if (!IsActorDestroyed()) { - unused << SendBlocked(0); + Unused << SendBlocked(0); } } void DeleteDatabaseOp::SendResults() { AssertIsOnOwningThread(); MOZ_ASSERT(mState == State::SendingResults); @@ -21835,17 +21835,17 @@ DeleteDatabaseOp::SendResults() FactoryRequestResponse response; if (NS_SUCCEEDED(mResultCode)) { response = DeleteDatabaseRequestResponse(mPreviousVersion); } else { response = ClampResultCode(mResultCode); } - unused << + Unused << PBackgroundIDBFactoryRequestParent::Send__delete__(this, response); } if (mDirectoryLock) { RefPtr<UnlockDirectoryRunnable> runnable = new UnlockDirectoryRunnable(mDirectoryLock.forget()); MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(runnable))); @@ -22909,17 +22909,17 @@ CreateFileOp::SendResults() #ifdef DEBUG mResultCode = response.get_nsresult(); #endif } } else { response = ClampResultCode(mResultCode); } - unused << + Unused << PBackgroundIDBDatabaseRequestParent::Send__delete__(this, response); } mState = State::Completed; } nsresult VersionChangeTransactionOp::SendSuccessResult() @@ -27267,17 +27267,17 @@ ContinueOp::SendSuccessResult() } void PermissionRequestHelper::OnPromptComplete(PermissionValue aPermissionValue) { MOZ_ASSERT(NS_IsMainThread()); if (!mActorDestroyed) { - unused << + Unused << PIndexedDBPermissionRequestParent::Send__delete__(this, aPermissionValue); } } void PermissionRequestHelper::ActorDestroy(ActorDestroyReason aWhy) { MOZ_ASSERT(NS_IsMainThread());
--- a/dom/ipc/Blob.cpp +++ b/dom/ipc/Blob.cpp @@ -268,17 +268,17 @@ CancelableRunnableWrapper::Cancel() MOZ_ASSERT(mDEBUGEventTarget); MOZ_ASSERT(NS_SUCCEEDED(mDEBUGEventTarget->IsOnCurrentThread(&onTarget))); MOZ_ASSERT(onTarget); if (NS_WARN_IF(!mRunnable)) { return NS_ERROR_UNEXPECTED; } - unused << Run(); + Unused << Run(); MOZ_ASSERT(!mRunnable); return NS_OK; } // Ensure that a nsCOMPtr/nsRefPtr is released on the target thread. template <template <class> class SmartPtr, class T> void @@ -4103,17 +4103,17 @@ BlobParent::NoteDyingRemoteBlobImpl() return; } // Must do this before calling Send__delete__ or we'll crash there trying to // access a dangling pointer. mBlobImpl = nullptr; mRemoteBlobImpl = nullptr; - unused << PBlobParent::Send__delete__(this); + Unused << PBlobParent::Send__delete__(this); } void BlobParent::NoteRunnableCompleted(OpenStreamRunnable* aRunnable) { AssertIsOnOwningThread(); MOZ_ASSERT(aRunnable);
--- a/dom/ipc/ColorPickerParent.cpp +++ b/dom/ipc/ColorPickerParent.cpp @@ -7,36 +7,36 @@ #include "ColorPickerParent.h" #include "nsComponentManagerUtils.h" #include "nsIDocument.h" #include "nsIDOMWindow.h" #include "mozilla/unused.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/TabParent.h" -using mozilla::unused; +using mozilla::Unused; using namespace mozilla::dom; NS_IMPL_ISUPPORTS(ColorPickerParent::ColorPickerShownCallback, nsIColorPickerShownCallback); NS_IMETHODIMP ColorPickerParent::ColorPickerShownCallback::Update(const nsAString& aColor) { if (mColorPickerParent) { - unused << mColorPickerParent->SendUpdate(nsString(aColor)); + Unused << mColorPickerParent->SendUpdate(nsString(aColor)); } return NS_OK; } NS_IMETHODIMP ColorPickerParent::ColorPickerShownCallback::Done(const nsAString& aColor) { if (mColorPickerParent) { - unused << mColorPickerParent->Send__delete__(mColorPickerParent, + Unused << mColorPickerParent->Send__delete__(mColorPickerParent, nsString(aColor)); } return NS_OK; } void ColorPickerParent::ColorPickerShownCallback::Destroy() { @@ -63,17 +63,17 @@ ColorPickerParent::CreateColorPicker() return NS_SUCCEEDED(mPicker->Init(window, mTitle, mInitialColor)); } bool ColorPickerParent::RecvOpen() { if (!CreateColorPicker()) { - unused << Send__delete__(this, mInitialColor); + Unused << Send__delete__(this, mInitialColor); return true; } mCallback = new ColorPickerShownCallback(this); mPicker->Open(mCallback); return true; };
--- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -344,17 +344,17 @@ private: mGCLog = nullptr; } if (mCCLog) { fclose(mCCLog); mCCLog = nullptr; } // The XPCOM refcount drives the IPC lifecycle; see also // DeallocPCycleCollectWithLogsChild. - unused << Send__delete__(this); + Unused << Send__delete__(this); } nsresult UnimplementedProperty() { MOZ_ASSERT(false, "This object is a remote GC/CC logger;" " this property isn't meaningful."); return NS_ERROR_UNEXPECTED; } @@ -808,17 +808,17 @@ ContentChild::ProvideWindowCommon(TabChi return NS_ERROR_ABORT; } if (aTabOpener) { MOZ_ASSERT(ipcContext->type() == IPCTabContext::TPopupIPCTabContext); ipcContext->get_PopupIPCTabContext().opener() = aTabOpener; } - unused << SendPBrowserConstructor( + Unused << SendPBrowserConstructor( // We release this ref in DeallocPBrowserChild RefPtr<TabChild>(newChild).forget().take(), tabId, *ipcContext, aChromeFlags, GetID(), IsForApp(), IsForBrowser()); nsAutoCString url; if (aURI) { aURI->GetSpec(url); @@ -2474,17 +2474,17 @@ OnFinishNuwaPreparation() // guarantees the ordering is safe for PBackground. while (!BackgroundChild::GetForCurrentThread()) { if (NS_WARN_IF(!NS_ProcessNextEvent())) { return; } } // This will create the actor. - unused << mozilla::dom::NuwaChild::GetSingleton(); + Unused << mozilla::dom::NuwaChild::GetSingleton(); MakeNuwaProcess(); } #endif static void PreloadSlowThings() { @@ -2599,42 +2599,42 @@ ContentChild::RecvFileSystemUpdate(const aIsUnmounting, aIsRemovable, aIsHotSwappable); RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton(); if (vs) { vs->UpdateVolume(volume); } #else // Remove warnings about unused arguments - unused << aFsName; - unused << aVolumeName; - unused << aState; - unused << aMountGeneration; - unused << aIsMediaPresent; - unused << aIsSharing; - unused << aIsFormatting; - unused << aIsFake; - unused << aIsUnmounting; - unused << aIsRemovable; - unused << aIsHotSwappable; + Unused << aFsName; + Unused << aVolumeName; + Unused << aState; + Unused << aMountGeneration; + Unused << aIsMediaPresent; + Unused << aIsSharing; + Unused << aIsFormatting; + Unused << aIsFake; + Unused << aIsUnmounting; + Unused << aIsRemovable; + Unused << aIsHotSwappable; #endif return true; } bool ContentChild::RecvVolumeRemoved(const nsString& aFsName) { #ifdef MOZ_WIDGET_GONK RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton(); if (vs) { vs->RemoveVolumeByName(aFsName); } #else // Remove warnings about unused arguments - unused << aFsName; + Unused << aFsName; #endif return true; } bool ContentChild::RecvNotifyProcessPriorityChanged( const hal::ProcessPriority& aPriority) { @@ -2816,17 +2816,17 @@ ContentChild::RecvGatherProfile() nsCString profileCString; UniquePtr<char[]> profile = profiler_get_profile(); if (profile) { profileCString = nsCString(profile.get(), strlen(profile.get())); } else { profileCString = EmptyCString(); } - unused << SendProfile(profileCString); + Unused << SendProfile(profileCString); return true; } bool ContentChild::RecvLoadPluginResult(const uint32_t& aPluginId, const bool& aResult) { nsresult rv; bool finalResult = aResult && @@ -2927,17 +2927,17 @@ ContentChild::RecvShutdown() os->NotifyObservers(static_cast<nsIContentChild*>(this), "content-child-shutdown", nullptr); } GetIPCChannel()->SetAbortOnError(false); // Ignore errors here. If this fails, the parent will kill us after a // timeout. - unused << SendFinishShutdown(); + Unused << SendFinishShutdown(); return true; } PBrowserOrId ContentChild::GetBrowserOrId(TabChild* aTabChild) { if (!aTabChild || this == aTabChild->Manager()) {
--- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -533,34 +533,34 @@ public: aDumpAllTraces, FILEToFileDescriptor(gcLog), FILEToFileDescriptor(ccLog)); } private: virtual bool RecvCloseGCLog() override { - unused << mSink->CloseGCLog(); + Unused << mSink->CloseGCLog(); return true; } virtual bool RecvCloseCCLog() override { - unused << mSink->CloseCCLog(); + Unused << mSink->CloseCCLog(); return true; } virtual bool Recv__delete__() override { // Report completion to mCallback only on successful // completion of the protocol. nsCOMPtr<nsIFile> gcLog, ccLog; mSink->GetGcLog(getter_AddRefs(gcLog)); mSink->GetCcLog(getter_AddRefs(ccLog)); - unused << mCallback->OnDump(gcLog, ccLog, /* parent = */ false); + Unused << mCallback->OnDump(gcLog, ccLog, /* parent = */ false); return true; } virtual void ActorDestroy(ActorDestroyReason aReason) override { // If the actor is unexpectedly destroyed, we deliberately // don't call Close[GC]CLog on the sink, because the logs may // be incomplete. See also the nsCycleCollectorLogSinkToFile @@ -1529,34 +1529,34 @@ ContentParent::Init() cpId.AppendInt(static_cast<uint64_t>(this->ChildID())); obs->NotifyObservers(static_cast<nsIObserver*>(this), "ipc:content-created", cpId.get()); } #ifdef ACCESSIBILITY // If accessibility is running in chrome process then start it in content // process. if (nsIPresShell::IsAccessibilityActive()) { - unused << SendActivateA11y(); + Unused << SendActivateA11y(); } #endif } void ContentParent::ForwardKnownInfo() { MOZ_ASSERT(mMetamorphosed); if (!mMetamorphosed) { return; } #ifdef MOZ_WIDGET_GONK InfallibleTArray<VolumeInfo> volumeInfo; RefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton(); if (vs && !mIsForBrowser) { vs->GetVolumesForIPC(&volumeInfo); - unused << SendVolumes(volumeInfo); + Unused << SendVolumes(volumeInfo); } #endif /* MOZ_WIDGET_GONK */ nsCOMPtr<nsISystemMessagesInternal> systemMessenger = do_GetService("@mozilla.org/system-message-internal;1"); if (systemMessenger && !mIsForBrowser) { nsCOMPtr<nsIURI> manifestURI; nsresult rv = NS_NewURI(getter_AddRefs(manifestURI), mAppManifestURL); @@ -2247,17 +2247,17 @@ ContentParent::NotifyTabDestroyed(const } nsTArray<PContentPermissionRequestParent*> parentArray = nsContentPermissionUtils::GetContentPermissionRequestParentById(aTabId); // Need to close undeleted ContentPermissionRequestParents before tab is closed. for (auto& permissionRequestParent : parentArray) { nsTArray<PermissionChoice> emptyChoices; - unused << PContentPermissionRequestParent::Send__delete__(permissionRequestParent, + Unused << PContentPermissionRequestParent::Send__delete__(permissionRequestParent, false, emptyChoices); } // There can be more than one PBrowser for a given app process // because of popup windows. When the last one closes, shut // us down. ContentProcessManager* cpm = ContentProcessManager::GetSingleton(); @@ -2528,17 +2528,17 @@ ContentParent::InitInternal(ProcessPrior nsCString version(gAppData->version); nsCString buildID(gAppData->buildID); nsCString name(gAppData->name); nsCString UAName(gAppData->UAName); nsCString ID(gAppData->ID); nsCString vendor(gAppData->vendor); // Sending all information to content process. - unused << SendAppInfo(version, buildID, name, UAName, ID, vendor); + Unused << SendAppInfo(version, buildID, name, UAName, ID, vendor); } // Initialize the message manager (and load delayed scripts) now that we // have established communications with the child. mMessageManager->InitWithCallback(this); // Set the subprocess's priority. We do this early on because we're likely // /lowering/ the process's CPU and memory priority, which it has inherited @@ -2568,43 +2568,43 @@ ContentParent::InitInternal(ProcessPrior #ifdef MOZ_WIDGET_GONK DebugOnly<bool> opened = PSharedBufferManager::Open(this); MOZ_ASSERT(opened); #endif } if (gAppData) { // Sending all information to content process. - unused << SendAppInit(); + Unused << SendAppInit(); } nsStyleSheetService *sheetService = nsStyleSheetService::GetInstance(); if (sheetService) { // This looks like a lot of work, but in a normal browser session we just // send two loads. nsCOMArray<nsIStyleSheet>& agentSheets = *sheetService->AgentStyleSheets(); for (uint32_t i = 0; i < agentSheets.Length(); i++) { URIParams uri; SerializeURI(agentSheets[i]->GetSheetURI(), uri); - unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::AGENT_SHEET); + Unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::AGENT_SHEET); } nsCOMArray<nsIStyleSheet>& userSheets = *sheetService->UserStyleSheets(); for (uint32_t i = 0; i < userSheets.Length(); i++) { URIParams uri; SerializeURI(userSheets[i]->GetSheetURI(), uri); - unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::USER_SHEET); + Unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::USER_SHEET); } nsCOMArray<nsIStyleSheet>& authorSheets = *sheetService->AuthorStyleSheets(); for (uint32_t i = 0; i < authorSheets.Length(); i++) { URIParams uri; SerializeURI(authorSheets[i]->GetSheetURI(), uri); - unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::AUTHOR_SHEET); + Unused << SendLoadAndRegisterSheet(uri, nsIStyleSheetService::AUTHOR_SHEET); } } #ifdef MOZ_CONTENT_SANDBOX bool shouldSandbox = true; #ifdef MOZ_NUWA_PROCESS if (IsNuwaProcess()) { shouldSandbox = false; @@ -3066,32 +3066,32 @@ ContentParent::OnNewProcessCreated(uint3 aPid, Move(*aFds.get())); content->Init(); size_t numNuwaPrefUpdates = sNuwaPrefUpdates ? sNuwaPrefUpdates->Length() : 0; // Resend pref updates to the forked child. for (size_t i = 0; i < numNuwaPrefUpdates; i++) { - mozilla::unused << content->SendPreferenceUpdate(sNuwaPrefUpdates->ElementAt(i)); + mozilla::Unused << content->SendPreferenceUpdate(sNuwaPrefUpdates->ElementAt(i)); } // Update offline settings. bool isOffline, isLangRTL; bool isConnected; InfallibleTArray<nsString> unusedDictionaries; ClipboardCapabilities clipboardCaps; DomainPolicyClone domainPolicy; StructuredCloneData initialData; RecvGetXPCOMProcessAttributes(&isOffline, &isConnected, &isLangRTL, &unusedDictionaries, &clipboardCaps, &domainPolicy, &initialData); - mozilla::unused << content->SendSetOffline(isOffline); - mozilla::unused << content->SendSetConnectivity(isConnected); + mozilla::Unused << content->SendSetOffline(isOffline); + mozilla::Unused << content->SendSetConnectivity(isConnected); MOZ_ASSERT(!clipboardCaps.supportsSelectionClipboard() && !clipboardCaps.supportsFindClipboard(), "Unexpected values"); PreallocatedProcessManager::PublishSpareProcess(content); return; #else NS_ERROR("ContentParent::OnNewProcessCreated() not implemented!"); @@ -3145,17 +3145,17 @@ ContentParent::Observe(nsISupports* aSub // 1.2 The topic doesn't send an IPC message (e.g. "xpcom-shutdown"). // 2. The topic needs special handling (e.g. nsPref:Changed), // add the topic to sNuwaSafeObserverTopics and then handle it if necessary. // listening for memory pressure event if (!strcmp(aTopic, "memory-pressure") && !StringEndsWith(nsDependentString(aData), NS_LITERAL_STRING("-no-forward"))) { - unused << SendFlushMemory(nsDependentString(aData)); + Unused << SendFlushMemory(nsDependentString(aData)); } // listening for remotePrefs... else if (!strcmp(aTopic, "nsPref:changed")) { // We know prefs are ASCII here. NS_LossyConvertUTF16toASCII strData(aData); PrefSetting pref(strData, null_t(), null_t()); Preferences::GetPreference(&pref); @@ -3194,32 +3194,32 @@ ContentParent::Observe(nsISupports* aSub !strcmp(aTopic, "alertshow") || !strcmp(aTopic, "alertdisablecallback") || !strcmp(aTopic, "alertsettingscallback")) { if (!SendNotifyAlertsObserver(nsDependentCString(aTopic), nsDependentString(aData))) return NS_ERROR_NOT_AVAILABLE; } else if (!strcmp(aTopic, "child-gc-request")){ - unused << SendGarbageCollect(); + Unused << SendGarbageCollect(); } else if (!strcmp(aTopic, "child-cc-request")){ - unused << SendCycleCollect(); + Unused << SendCycleCollect(); } else if (!strcmp(aTopic, "child-mmu-request")){ - unused << SendMinimizeMemoryUsage(); + Unused << SendMinimizeMemoryUsage(); } else if (!strcmp(aTopic, "last-pb-context-exited")) { - unused << SendLastPrivateDocShellDestroyed(); + Unused << SendLastPrivateDocShellDestroyed(); } else if (!strcmp(aTopic, "file-watcher-update")) { nsCString creason; CopyUTF16toUTF8(aData, creason); DeviceStorageFile* file = static_cast<DeviceStorageFile*>(aSubject); - unused << SendFilePathUpdate(file->mStorageType, file->mStorageName, file->mPath, creason); + Unused << SendFilePathUpdate(file->mStorageType, file->mStorageName, file->mPath, creason); } #ifdef MOZ_WIDGET_GONK else if(!strcmp(aTopic, NS_VOLUME_STATE_CHANGED)) { nsCOMPtr<nsIVolume> vol = do_QueryInterface(aSubject); if (!vol) { return NS_ERROR_NOT_AVAILABLE; } @@ -3242,77 +3242,77 @@ ContentParent::Observe(nsISupports* aSub vol->GetIsMediaPresent(&isMediaPresent); vol->GetIsSharing(&isSharing); vol->GetIsFormatting(&isFormatting); vol->GetIsFake(&isFake); vol->GetIsUnmounting(&isUnmounting); vol->GetIsRemovable(&isRemovable); vol->GetIsHotSwappable(&isHotSwappable); - unused << SendFileSystemUpdate(volName, mountPoint, state, + Unused << SendFileSystemUpdate(volName, mountPoint, state, mountGeneration, isMediaPresent, isSharing, isFormatting, isFake, isUnmounting, isRemovable, isHotSwappable); } else if (!strcmp(aTopic, "phone-state-changed")) { nsString state(aData); - unused << SendNotifyPhoneStateChange(state); + Unused << SendNotifyPhoneStateChange(state); } else if(!strcmp(aTopic, NS_VOLUME_REMOVED)) { nsString volName(aData); - unused << SendVolumeRemoved(volName); + Unused << SendVolumeRemoved(volName); } #endif #ifdef ACCESSIBILITY // Make sure accessibility is running in content process when accessibility // gets initiated in chrome process. else if (aData && (*aData == '1') && !strcmp(aTopic, "a11y-init-or-shutdown")) { - unused << SendActivateA11y(); + Unused << SendActivateA11y(); } #endif else if (!strcmp(aTopic, "app-theme-changed")) { - unused << SendOnAppThemeChanged(); + Unused << SendOnAppThemeChanged(); } #ifdef MOZ_ENABLE_PROFILER_SPS else if (!strcmp(aTopic, "profiler-started")) { nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject)); uint32_t entries; double interval; params->GetEntries(&entries); params->GetInterval(&interval); const nsTArray<nsCString>& features = params->GetFeatures(); const nsTArray<nsCString>& threadFilterNames = params->GetThreadFilterNames(); - unused << SendStartProfiler(entries, interval, features, threadFilterNames); + Unused << SendStartProfiler(entries, interval, features, threadFilterNames); } else if (!strcmp(aTopic, "profiler-stopped")) { - unused << SendStopProfiler(); + Unused << SendStopProfiler(); } else if (!strcmp(aTopic, "profiler-paused")) { - unused << SendPauseProfiler(true); + Unused << SendPauseProfiler(true); } else if (!strcmp(aTopic, "profiler-resumed")) { - unused << SendPauseProfiler(false); + Unused << SendPauseProfiler(false); } else if (!strcmp(aTopic, "profiler-subprocess-gather")) { mGatherer = static_cast<ProfileGatherer*>(aSubject); mGatherer->WillGatherOOPProfile(); - unused << SendGatherProfile(); + Unused << SendGatherProfile(); } else if (!strcmp(aTopic, "profiler-subprocess")) { nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject); if (pse) { if (!mProfile.IsEmpty()) { pse->AddSubProfile(mProfile.get()); mProfile.Truncate(); } } } #endif else if (!strcmp(aTopic, "gmp-changed")) { - unused << SendNotifyGMPsChanged(); + Unused << SendNotifyGMPsChanged(); } return NS_OK; } PGMPServiceParent* ContentParent::AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherProcess) { @@ -4224,17 +4224,17 @@ bool ContentParent::RecvGetSystemMemory(const uint64_t& aGetterId) { uint32_t memoryTotal = 0; #if defined(XP_LINUX) memoryTotal = mozilla::hal::GetTotalSystemMemoryLevel(); #endif - unused << SendSystemMemoryAvailable(aGetterId, memoryTotal); + Unused << SendSystemMemoryAvailable(aGetterId, memoryTotal); return true; } bool ContentParent::RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>* aLookAndFeelIntCache) { *aLookAndFeelIntCache = LookAndFeel::GetIntCache(); @@ -4336,26 +4336,26 @@ ContentParent::RecvCloseAlert(const nsSt return true; } bool ContentParent::RecvDisableNotifications(const IPC::Principal& aPrincipal) { if (HasNotificationPermission(aPrincipal)) { - unused << Notification::RemovePermission(aPrincipal); + Unused << Notification::RemovePermission(aPrincipal); } return true; } bool ContentParent::RecvOpenNotificationSettings(const IPC::Principal& aPrincipal) { if (HasNotificationPermission(aPrincipal)) { - unused << Notification::OpenSettings(aPrincipal); + Unused << Notification::OpenSettings(aPrincipal); } return true; } bool ContentParent::RecvSyncMessage(const nsString& aMsg, const ClonedMessageData& aData, InfallibleTArray<CpowEntry>&& aCpows, @@ -4499,28 +4499,28 @@ ContentParent::RecvSetGeolocationHigherA } } return true; } NS_IMETHODIMP ContentParent::HandleEvent(nsIDOMGeoPosition* postion) { - unused << SendGeolocationUpdate(GeoPosition(postion)); + Unused << SendGeolocationUpdate(GeoPosition(postion)); return NS_OK; } NS_IMETHODIMP ContentParent::HandleEvent(nsIDOMGeoPositionError* postionError) { int16_t errorCode; nsresult rv; rv = postionError->GetCode(&errorCode); NS_ENSURE_SUCCESS(rv,rv); - unused << SendGeolocationError(errorCode); + Unused << SendGeolocationError(errorCode); return NS_OK; } nsConsoleService * ContentParent::GetConsoleService() { if (mConsoleService) { return mConsoleService.get(); @@ -5079,17 +5079,17 @@ ContentParent::NotifyUpdatedDictionaries nsCOMPtr<nsISpellChecker> spellChecker(do_GetService(NS_SPELLCHECKER_CONTRACTID)); MOZ_ASSERT(spellChecker, "No spell checker?"); InfallibleTArray<nsString> dictionaries; spellChecker->GetDictionaryList(&dictionaries); for (size_t i = 0; i < processes.Length(); ++i) { - unused << processes[i]->SendUpdateDictionaryList(dictionaries); + Unused << processes[i]->SendUpdateDictionaryList(dictionaries); } } /*static*/ TabId ContentParent::AllocateTabId(const TabId& aOpenerTabId, const IPCTabContext& aContext, const ContentParentId& aCpId) { @@ -5205,17 +5205,17 @@ ContentParent::RecvPOfflineCacheUpdateCo MOZ_ASSERT(aActor); RefPtr<mozilla::docshell::OfflineCacheUpdateParent> update = static_cast<mozilla::docshell::OfflineCacheUpdateParent*>(aActor); nsresult rv = update->Schedule(aManifestURI, aDocumentURI, aLoadingPrincipal, aStickDocument); if (NS_FAILED(rv) && IsAlive()) { // Inform the child of failure. - unused << update->SendFinish(false, false); + Unused << update->SendFinish(false, false); } return true; } bool ContentParent::DeallocPOfflineCacheUpdateParent(POfflineCacheUpdateParent* aActor) { @@ -5284,17 +5284,17 @@ ContentParent::MaybeInvokeDragSession(Ta transfer->GetTransferables(lc); nsContentUtils::TransferablesToIPCTransferables(transferables, dataTransfers, false, nullptr, this); uint32_t action; session->GetDragAction(&action); - mozilla::unused << SendInvokeDragSession(dataTransfers, action); + mozilla::Unused << SendInvokeDragSession(dataTransfers, action); } } } bool ContentParent::RecvUpdateDropEffect(const uint32_t& aDragAction, const uint32_t& aDropEffect) { @@ -5741,17 +5741,17 @@ ContentParent::RecvGetDeviceStorageLocat } // namespace dom } // namespace mozilla NS_IMPL_ISUPPORTS(ParentIdleListener, nsIObserver) NS_IMETHODIMP ParentIdleListener::Observe(nsISupports*, const char* aTopic, const char16_t* aData) { - mozilla::unused << mParent->SendNotifyIdleObserver(mObserver, + mozilla::Unused << mParent->SendNotifyIdleObserver(mObserver, nsDependentCString(aTopic), nsDependentString(aData)); return NS_OK; } bool ContentParent::HandleWindowsMessages(const Message& aMsg) const {
--- a/dom/ipc/ContentProcess.cpp +++ b/dom/ipc/ContentProcess.cpp @@ -53,17 +53,17 @@ SetUpSandboxEnvironment() // Append our profile specific temp name. rv = lowIntegrityTemp->Append(NS_LITERAL_STRING("Temp-") + tempDirSuffix); if (NS_WARN_IF(NS_FAILED(rv))) { return; } // Change the gecko defined temp directory to our low integrity one. // Undefine returns a failure if the property is not already set. - unused << nsDirectoryService::gService->Undefine(NS_OS_TEMP_DIR); + Unused << nsDirectoryService::gService->Undefine(NS_OS_TEMP_DIR); rv = nsDirectoryService::gService->Set(NS_OS_TEMP_DIR, lowIntegrityTemp); if (NS_WARN_IF(NS_FAILED(rv))) { return; } } #endif void
--- a/dom/ipc/FilePickerParent.cpp +++ b/dom/ipc/FilePickerParent.cpp @@ -13,17 +13,17 @@ #include "nsISimpleEnumerator.h" #include "mozilla/unused.h" #include "mozilla/dom/File.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/TabParent.h" #include "mozilla/dom/ipc/BlobParent.h" -using mozilla::unused; +using mozilla::Unused; using namespace mozilla::dom; NS_IMPL_ISUPPORTS(FilePickerParent::FilePickerShownCallback, nsIFilePickerShownCallback); NS_IMETHODIMP FilePickerParent::FilePickerShownCallback::Done(int16_t aResult) { @@ -120,26 +120,26 @@ FilePickerParent::SendFiles(const nsTArr BlobParent* blobParent = parent->GetOrCreateActorForBlobImpl(aBlobs[i]); if (blobParent) { blobs.AppendElement(blobParent); } } InputFiles inblobs; inblobs.blobsParent().SwapElements(blobs); - unused << Send__delete__(this, inblobs, mResult); + Unused << Send__delete__(this, inblobs, mResult); } void FilePickerParent::Done(int16_t aResult) { mResult = aResult; if (mResult != nsIFilePicker::returnOK) { - unused << Send__delete__(this, void_t(), mResult); + Unused << Send__delete__(this, void_t(), mResult); return; } nsTArray<RefPtr<BlobImpl>> blobs; if (mMode == nsIFilePicker::modeOpenMultiple) { nsCOMPtr<nsISimpleEnumerator> iter; NS_ENSURE_SUCCESS_VOID(mFilePicker->GetFiles(getter_AddRefs(iter))); @@ -162,17 +162,17 @@ FilePickerParent::Done(int16_t aResult) blobs.AppendElement(blobimpl); } } MOZ_ASSERT(!mRunnable); mRunnable = new FileSizeAndDateRunnable(this, blobs); // Dispatch to background thread to do I/O: if (!mRunnable->Dispatch()) { - unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel); + Unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel); } } bool FilePickerParent::CreateFilePicker() { mFilePicker = do_CreateInstance("@mozilla.org/filepicker;1"); if (!mFilePicker) { @@ -197,17 +197,17 @@ FilePickerParent::RecvOpen(const int16_t const bool& aAddToRecentDocs, const nsString& aDefaultFile, const nsString& aDefaultExtension, InfallibleTArray<nsString>&& aFilters, InfallibleTArray<nsString>&& aFilterNames, const nsString& aDisplayDirectory) { if (!CreateFilePicker()) { - unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel); + Unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel); return true; } mFilePicker->SetAddToRecentDocs(aAddToRecentDocs); for (uint32_t i = 0; i < aFilters.Length(); ++i) { mFilePicker->AppendFilter(aFilterNames[i], aFilters[i]); }
--- a/dom/ipc/NuwaChild.cpp +++ b/dom/ipc/NuwaChild.cpp @@ -234,17 +234,17 @@ AddNewIPCProcess(pid_t aPid, NuwaProtoFd } NS_EXPORT void OnNuwaProcessReady() { NuwaChild* nuwaChild = NuwaChild::GetSingleton(); MOZ_ASSERT(nuwaChild); - mozilla::unused << nuwaChild->SendNotifyReady(); + mozilla::Unused << nuwaChild->SendNotifyReady(); } NS_EXPORT void AfterNuwaFork() { SetCurrentProcessPrivileges(base::PRIVILEGES_DEFAULT); #if defined(XP_LINUX) && defined(MOZ_SANDBOX) mozilla::SandboxEarlyInit(XRE_GetProcessType(), /* isNuwa: */ false);
--- a/dom/ipc/NuwaParent.cpp +++ b/dom/ipc/NuwaParent.cpp @@ -120,17 +120,17 @@ NuwaParent::CloneProtocol(Channel* aChan nsCOMPtr<nsIRunnable> nested = NS_NewRunnableFunction([actor] () -> void { AssertIsOnBackgroundThread(); // Call NuwaParent::ActorConstructed() on the worker thread. actor->ActorConstructed(); // The actor can finally be deleted after fully constructed. - mozilla::unused << actor->Send__delete__(actor); + mozilla::Unused << actor->Send__delete__(actor); }); MOZ_ASSERT(nested); MOZ_ALWAYS_TRUE(NS_SUCCEEDED( actor->mWorkerThread->Dispatch(nested, NS_DISPATCH_NORMAL))); }); MOZ_ASSERT(runnable); MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(runnable))); @@ -227,17 +227,17 @@ NuwaParent::ForkNewProcess(uint32_t& aPi MOZ_ASSERT(mWorkerThread); MOZ_ASSERT(NS_IsMainThread()); mNewProcessFds = Move(aFds); RefPtr<NuwaParent> self = this; nsCOMPtr<nsIRunnable> runnable = NS_NewRunnableFunction([self] () -> void { - mozilla::unused << self->SendFork(); + mozilla::Unused << self->SendFork(); }); MOZ_ASSERT(runnable); MOZ_ALWAYS_TRUE(NS_SUCCEEDED(mWorkerThread->Dispatch(runnable, NS_DISPATCH_NORMAL))); if (!aBlocking) { return false; }
--- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -314,17 +314,17 @@ SendTestOnlyNotification(const char* aMe AutoSafeJSContext cx; nsString message; message.AppendPrintf("%s", aMessage); nsCOMPtr<nsIMessageBroadcaster> ppmm = do_GetService("@mozilla.org/parentprocessmessagemanager;1"); - mozilla::unused << ppmm->BroadcastAsyncMessage( + mozilla::Unused << ppmm->BroadcastAsyncMessage( message, JS::NullHandleValue, JS::NullHandleValue, cx, 1); } static void KillOrCloseProcess(ContentParent* aProcess) { if (TestCaseEnabled()) { // KillHard() the process because we don't want the process to abort when we
--- a/dom/ipc/ProcessHangMonitor.cpp +++ b/dom/ipc/ProcessHangMonitor.cpp @@ -345,17 +345,17 @@ HangMonitorChild::Open(Transport* aTrans } void HangMonitorChild::NotifySlowScriptAsync(TabId aTabId, const nsCString& aFileName, unsigned aLineNo) { if (mIPCOpen) { - unused << SendHangEvidence(SlowScriptData(aTabId, aFileName, aLineNo)); + Unused << SendHangEvidence(SlowScriptData(aTabId, aFileName, aLineNo)); } } HangMonitorChild::SlowScriptAction HangMonitorChild::NotifySlowScript(nsITabChild* aTabChild, const char* aFileName, unsigned aLineNo) { @@ -424,17 +424,17 @@ HangMonitorChild::NotifyPluginHang(uint3 void HangMonitorChild::NotifyPluginHangAsync(uint32_t aPluginId) { MOZ_RELEASE_ASSERT(MessageLoop::current() == MonitorLoop()); // bounce back to parent on background thread if (mIPCOpen) { - unused << SendHangEvidence(PluginHangData(aPluginId)); + Unused << SendHangEvidence(PluginHangData(aPluginId)); } } void HangMonitorChild::ClearHang() { MOZ_ASSERT(NS_IsMainThread()); @@ -618,37 +618,37 @@ HangMonitorParent::RecvHangEvidence(cons } void HangMonitorParent::TerminateScript() { MOZ_RELEASE_ASSERT(MessageLoop::current() == MonitorLoop()); if (mIPCOpen) { - unused << SendTerminateScript(); + Unused << SendTerminateScript(); } } void HangMonitorParent::BeginStartingDebugger() { MOZ_RELEASE_ASSERT(MessageLoop::current() == MonitorLoop()); if (mIPCOpen) { - unused << SendBeginStartingDebugger(); + Unused << SendBeginStartingDebugger(); } } void HangMonitorParent::EndStartingDebugger() { MOZ_RELEASE_ASSERT(MessageLoop::current() == MonitorLoop()); if (mIPCOpen) { - unused << SendEndStartingDebugger(); + Unused << SendEndStartingDebugger(); } } void HangMonitorParent::CleanupPluginHang(uint32_t aPluginId, bool aRemoveFiles) { MutexAutoLock lock(mBrowserCrashDumpHashLock); nsAutoString crashId;
--- a/dom/ipc/ProcessPriorityManager.cpp +++ b/dom/ipc/ProcessPriorityManager.cpp @@ -1154,21 +1154,21 @@ ParticularProcessPriorityManager::SetPri mPriority = aPriority; hal::SetProcessPriority(Pid(), mPriority); if (oldPriority != mPriority) { ProcessPriorityManagerImpl::GetSingleton()-> NotifyProcessPriorityChanged(this, oldPriority); - unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority); + Unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority); } if (aPriority < PROCESS_PRIORITY_FOREGROUND) { - unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority")); + Unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority")); } FireTestOnlyObserverNotification("process-priority-set", ProcessPriorityToString(mPriority)); } void ParticularProcessPriorityManager::Freeze() @@ -1372,17 +1372,17 @@ ProcessLRUPool::CalculateLRULevel(uint32 // Priority+1: LRU2, LRU3 // Priority+2: LRU4, LRU5, LRU6, LRU7 // Priority+3: LRU8, LRU9, LRU10, LRU11, LRU12, LRU12, LRU13, LRU14, LRU15 // ... // Priority+L-1: 2^(number of LRU pool levels - 1) // (End of buffer) int exp; - unused << frexp(static_cast<double>(aLRU), &exp); + Unused << frexp(static_cast<double>(aLRU), &exp); uint32_t level = std::max(exp - 1, 0); return std::min(mLRUPoolLevels - 1, level); } void ProcessLRUPool::Remove(ParticularProcessPriorityManager* aParticularManager) {
--- a/dom/ipc/ScreenManagerParent.cpp +++ b/dom/ipc/ScreenManagerParent.cpp @@ -21,17 +21,17 @@ ScreenManagerParent::ScreenManagerParent float* aSystemDefaultScale, bool* aSuccess) { mScreenMgr = do_GetService(sScreenManagerContractID); if (!mScreenMgr) { MOZ_CRASH("Couldn't get nsIScreenManager from ScreenManagerParent."); } - unused << RecvRefresh(aNumberOfScreens, aSystemDefaultScale, aSuccess); + Unused << RecvRefresh(aNumberOfScreens, aSystemDefaultScale, aSuccess); } bool ScreenManagerParent::RecvRefresh(uint32_t* aNumberOfScreens, float* aSystemDefaultScale, bool* aSuccess) { *aSuccess = false; @@ -59,17 +59,17 @@ ScreenManagerParent::RecvScreenRefresh(c nsCOMPtr<nsIScreen> screen; nsresult rv = mScreenMgr->ScreenForId(aId, getter_AddRefs(screen)); if (NS_FAILED(rv)) { return true; } ScreenDetails details; - unused << ExtractScreenDetails(screen, details); + Unused << ExtractScreenDetails(screen, details); *aRetVal = details; *aSuccess = true; return true; } bool ScreenManagerParent::RecvGetPrimaryScreen(ScreenDetails* aRetVal,
--- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -390,17 +390,17 @@ private: NS_IMETHOD Run() { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(mTabChild); // Check in case ActorDestroy was called after RecvDestroy message. if (mTabChild->IPCOpen()) { - unused << PBrowserChild::Send__delete__(mTabChild); + Unused << PBrowserChild::Send__delete__(mTabChild); } mTabChild = nullptr; return NS_OK; } }; namespace { @@ -694,17 +694,17 @@ TabChild::Observe(nsISupports *aSubject, if (window->WindowID() != windowID) { return NS_OK; } nsAutoString activeStr(aData); bool active = activeStr.EqualsLiteral("active"); if (active != mAudioChannelsActive[audioChannel]) { mAudioChannelsActive[audioChannel] = active; - unused << SendAudioChannelActivityNotification(audioChannel, active); + Unused << SendAudioChannelActivityNotification(audioChannel, active); } } return NS_OK; } bool TabChild::DoUpdateZoomConstraints(const uint32_t& aPresShellId, @@ -938,17 +938,17 @@ TabChild::SetStatusWithContext(uint32_t SendSetStatus(aStatusType, nsString(aStatusText)); return NS_OK; } NS_IMETHODIMP TabChild::SetDimensions(uint32_t aFlags, int32_t aX, int32_t aY, int32_t aCx, int32_t aCy) { - unused << PBrowserChild::SendSetDimensions(aFlags, aX, aY, aCx, aCy); + Unused << PBrowserChild::SendSetDimensions(aFlags, aX, aY, aCx, aCy); return NS_OK; } NS_IMETHODIMP TabChild::GetDimensions(uint32_t aFlags, int32_t* aX, int32_t* aY, int32_t* aCx, int32_t* aCy) { @@ -1987,27 +1987,27 @@ TabChild::RecvKeyEvent(const nsString& a } bool TabChild::RecvCompositionEvent(const WidgetCompositionEvent& event) { WidgetCompositionEvent localEvent(event); localEvent.widget = mPuppetWidget; APZCCallbackHelper::DispatchWidgetEvent(localEvent); - unused << SendOnEventNeedingAckHandled(event.mMessage); + Unused << SendOnEventNeedingAckHandled(event.mMessage); return true; } bool TabChild::RecvSelectionEvent(const WidgetSelectionEvent& event) { WidgetSelectionEvent localEvent(event); localEvent.widget = mPuppetWidget; APZCCallbackHelper::DispatchWidgetEvent(localEvent); - unused << SendOnEventNeedingAckHandled(event.mMessage); + Unused << SendOnEventNeedingAckHandled(event.mMessage); return true; } a11y::PDocAccessibleChild* TabChild::AllocPDocAccessibleChild(PDocAccessibleChild*, const uint64_t&) { MOZ_ASSERT(false, "should never call this!"); return nullptr;
--- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -179,17 +179,17 @@ private: FileDescriptor::PlatformHandleType handle = FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFD)); fd = FileDescriptor(handle); } // Our TabParent may have been destroyed already. If so, don't send any // fds over, just go back to the IO thread and close them. if (!tabParent->IsDestroyed()) { - mozilla::unused << tabParent->SendCacheFileDescriptor(mPath, fd); + mozilla::Unused << tabParent->SendCacheFileDescriptor(mPath, fd); } if (!mFD) { return; } nsCOMPtr<nsIEventTarget> eventTarget; mEventTarget.swap(eventTarget); @@ -227,17 +227,17 @@ private: OpenBlobImpl(); if (NS_FAILED(NS_DispatchToMainThread(this))) { NS_WARNING("Failed to dispatch to main thread!"); // Intentionally leak the runnable (but not the fd) rather // than crash when trying to release a main thread object // off the main thread. - mozilla::unused << mTabParent.forget(); + mozilla::Unused << mTabParent.forget(); CloseFile(); } } void CloseFile() { // It's possible for this to happen on the main thread if the dispatch // to the stream service fails after we've already opened the file so @@ -544,17 +544,17 @@ TabParent::DestroyInternal() { IMEStateManager::OnTabParentDestroying(this); RemoveWindowListeners(); // If this fails, it's most likely due to a content-process crash, // and auto-cleanup will kick in. Otherwise, the child side will // destroy itself and send back __delete__(). - unused << SendDestroy(); + Unused << SendDestroy(); if (RenderFrameParent* frame = GetRenderFrame()) { RemoveTabParentFromTable(frame->GetLayersId()); frame->Destroy(); } // Let all PluginWidgets know we are tearing down. Prevents // these objects from sending async events after the child side @@ -764,27 +764,27 @@ TabParent::LoadURL(nsIURI* aURI) mDelayedURL = spec; return; } uint32_t appId = OwnOrContainingAppId(); if (mSendOfflineStatus && NS_IsAppOffline(appId)) { // If the app is offline in the parent process // pass that state to the child process as well - unused << SendAppOfflineStatus(appId, true); + Unused << SendAppOfflineStatus(appId, true); } mSendOfflineStatus = false; // This object contains the configuration for this new app. BrowserConfiguration configuration; if (NS_WARN_IF(!InitBrowserConfiguration(spec, configuration))) { return; } - unused << SendLoadURL(spec, configuration, GetShowInfo()); + Unused << SendLoadURL(spec, configuration, GetShowInfo()); // If this app is a packaged app then we can speed startup by sending over // the file descriptor for the "application.zip" file that it will // invariably request. Only do this once. if (!mAppPackageFileDescriptorSent) { mAppPackageFileDescriptorSent = true; nsCOMPtr<mozIApplication> app = GetOwnOrContainingApp(); @@ -819,17 +819,17 @@ TabParent::LoadURL(nsIURI* aURI) #ifndef XP_WIN PRFileDesc* cachedFd = nullptr; gJarHandler->JarCache()->GetFd(packageFile, &cachedFd); if (cachedFd) { FileDescriptor::PlatformHandleType handle = FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(cachedFd)); - unused << SendCacheFileDescriptor(path, FileDescriptor(handle)); + Unused << SendCacheFileDescriptor(path, FileDescriptor(handle)); } else #endif { RefPtr<OpenFileAndSendFDRunnable> openFileRunnable = new OpenFileAndSendFDRunnable(path, this); openFileRunnable->Dispatch(); } } @@ -858,21 +858,21 @@ TabParent::Show(const ScreenIntSize& siz if (frameLoader) { renderFrame = new RenderFrameParent(frameLoader, &textureFactoryIdentifier, &layersId, &success); MOZ_ASSERT(success); AddTabParentToTable(layersId, this); - unused << SendPRenderFrameConstructor(renderFrame); + Unused << SendPRenderFrameConstructor(renderFrame); } } - unused << SendShow(size, GetShowInfo(), textureFactoryIdentifier, + Unused << SendShow(size, GetShowInfo(), textureFactoryIdentifier, layersId, renderFrame, aParentIsActive); } bool TabParent::RecvSetDimensions(const uint32_t& aFlags, const int32_t& aX, const int32_t& aY, const int32_t& aCx, const int32_t& aCy) { @@ -957,152 +957,152 @@ TabParent::UpdateDimensions(const nsIntR ViewAs<LayoutDevicePixel>(mRect, PixelCastJustification::LayoutDeviceIsScreenForTabDims); LayoutDeviceIntSize devicePixelSize = ViewAs<LayoutDevicePixel>(mDimensions.ToUnknownSize(), PixelCastJustification::LayoutDeviceIsScreenForTabDims); CSSRect unscaledRect = devicePixelRect / widgetScale; CSSSize unscaledSize = devicePixelSize / widgetScale; - unused << SendUpdateDimensions(unscaledRect, unscaledSize, + Unused << SendUpdateDimensions(unscaledRect, unscaledSize, widget->SizeMode(), orientation, chromeOffset); } } void TabParent::UpdateFrame(const FrameMetrics& aFrameMetrics) { if (!mIsDestroyed) { - unused << SendUpdateFrame(aFrameMetrics); + Unused << SendUpdateFrame(aFrameMetrics); } } void TabParent::UIResolutionChanged() { if (!mIsDestroyed) { // TryCacheDPIAndScale()'s cache is keyed off of // mDPI being greater than 0, so this invalidates it. mDPI = -1; TryCacheDPIAndScale(); // If mDPI was set to -1 to invalidate it and then TryCacheDPIAndScale // fails to cache the values, then mDefaultScale.scale might be invalid. // We don't want to send that value to content. Just send -1 for it too in // that case. - unused << SendUIResolutionChanged(mDPI, mDPI < 0 ? -1.0 : mDefaultScale.scale); + Unused << SendUIResolutionChanged(mDPI, mDPI < 0 ? -1.0 : mDefaultScale.scale); } } void TabParent::ThemeChanged() { if (!mIsDestroyed) { // The theme has changed, and any cached values we had sent down // to the child have been invalidated. When this method is called, // LookAndFeel should have the up-to-date values, which we now // send down to the child. We do this for every remote tab for now, // but bug 1156934 has been filed to do it once per content process. - unused << SendThemeChanged(LookAndFeel::GetIntCache()); + Unused << SendThemeChanged(LookAndFeel::GetIntCache()); } } void TabParent::HandleAccessKey(nsTArray<uint32_t>& aCharCodes, const bool& aIsTrusted, const int32_t& aModifierMask) { if (!mIsDestroyed) { - unused << SendHandleAccessKey(aCharCodes, aIsTrusted, aModifierMask); + Unused << SendHandleAccessKey(aCharCodes, aIsTrusted, aModifierMask); } } void TabParent::RequestFlingSnap(const FrameMetrics::ViewID& aScrollId, const mozilla::CSSPoint& aDestination) { if (!mIsDestroyed) { - unused << SendRequestFlingSnap(aScrollId, aDestination); + Unused << SendRequestFlingSnap(aScrollId, aDestination); } } void TabParent::AcknowledgeScrollUpdate(const ViewID& aScrollId, const uint32_t& aScrollGeneration) { if (!mIsDestroyed) { - unused << SendAcknowledgeScrollUpdate(aScrollId, aScrollGeneration); + Unused << SendAcknowledgeScrollUpdate(aScrollId, aScrollGeneration); } } void TabParent::HandleDoubleTap(const CSSPoint& aPoint, Modifiers aModifiers, const ScrollableLayerGuid &aGuid) { if (!mIsDestroyed) { - unused << SendHandleDoubleTap(aPoint, aModifiers, aGuid); + Unused << SendHandleDoubleTap(aPoint, aModifiers, aGuid); } } void TabParent::HandleSingleTap(const CSSPoint& aPoint, Modifiers aModifiers, const ScrollableLayerGuid &aGuid) { if (!mIsDestroyed) { - unused << SendHandleSingleTap(aPoint, aModifiers, aGuid); + Unused << SendHandleSingleTap(aPoint, aModifiers, aGuid); } } void TabParent::HandleLongTap(const CSSPoint& aPoint, Modifiers aModifiers, const ScrollableLayerGuid &aGuid, uint64_t aInputBlockId) { if (!mIsDestroyed) { - unused << SendHandleLongTap(aPoint, aModifiers, aGuid, aInputBlockId); + Unused << SendHandleLongTap(aPoint, aModifiers, aGuid, aInputBlockId); } } void TabParent::NotifyAPZStateChange(ViewID aViewId, APZStateChange aChange, int aArg) { if (!mIsDestroyed) { - unused << SendNotifyAPZStateChange(aViewId, aChange, aArg); + Unused << SendNotifyAPZStateChange(aViewId, aChange, aArg); } } void TabParent::NotifyMouseScrollTestEvent(const ViewID& aScrollId, const nsString& aEvent) { if (!mIsDestroyed) { - unused << SendMouseScrollTestEvent(aScrollId, aEvent); + Unused << SendMouseScrollTestEvent(aScrollId, aEvent); } } void TabParent::NotifyFlushComplete() { if (!mIsDestroyed) { - unused << SendNotifyFlushComplete(); + Unused << SendNotifyFlushComplete(); } } void TabParent::Activate() { if (!mIsDestroyed) { - unused << SendActivate(); + Unused << SendActivate(); } } void TabParent::Deactivate() { if (!mIsDestroyed) { - unused << SendDeactivate(); + Unused << SendDeactivate(); } } NS_IMETHODIMP TabParent::Init(nsIDOMWindow *window) { return NS_OK; } @@ -1283,31 +1283,31 @@ TabParent::DeallocPIndexedDBPermissionRe } void TabParent::SendMouseEvent(const nsAString& aType, float aX, float aY, int32_t aButton, int32_t aClickCount, int32_t aModifiers, bool aIgnoreRootScrollFrame) { if (!mIsDestroyed) { - unused << PBrowserParent::SendMouseEvent(nsString(aType), aX, aY, + Unused << PBrowserParent::SendMouseEvent(nsString(aType), aX, aY, aButton, aClickCount, aModifiers, aIgnoreRootScrollFrame); } } void TabParent::SendKeyEvent(const nsAString& aType, int32_t aKeyCode, int32_t aCharCode, int32_t aModifiers, bool aPreventDefault) { if (!mIsDestroyed) { - unused << PBrowserParent::SendKeyEvent(nsString(aType), aKeyCode, aCharCode, + Unused << PBrowserParent::SendKeyEvent(nsString(aType), aKeyCode, aCharCode, aModifiers, aPreventDefault); } } bool TabParent::SendRealMouseEvent(WidgetMouseEvent& event) { if (mIsDestroyed) { return false; @@ -2904,17 +2904,17 @@ TabParent::GetUseAsyncPanZoom(bool* useA return NS_OK; } // defined in nsITabParent NS_IMETHODIMP TabParent::SetDocShellIsActive(bool isActive) { mDocShellIsActive = isActive; - unused << SendSetDocShellIsActive(isActive); + Unused << SendSetDocShellIsActive(isActive); return NS_OK; } NS_IMETHODIMP TabParent::GetDocShellIsActive(bool* aIsActive) { *aIsActive = mDocShellIsActive; return NS_OK; @@ -2930,17 +2930,17 @@ TabParent::SuppressDisplayport(bool aEna if (aEnabled) { mActiveSupressDisplayportCount++; } else { mActiveSupressDisplayportCount--; } MOZ_ASSERT(mActiveSupressDisplayportCount >= 0); - unused << SendSuppressDisplayport(aEnabled); + Unused << SendSuppressDisplayport(aEnabled); return NS_OK; } NS_IMETHODIMP TabParent::GetTabId(uint64_t* aId) { *aId = GetTabId(); return NS_OK; @@ -2957,17 +2957,17 @@ void TabParent::SetHasContentOpener(bool aHasContentOpener) { mHasContentOpener = aHasContentOpener; } NS_IMETHODIMP TabParent::NavigateByKey(bool aForward, bool aForDocumentNavigation) { - unused << SendNavigateByKey(aForward, aForDocumentNavigation); + Unused << SendNavigateByKey(aForward, aForDocumentNavigation); return NS_OK; } class LayerTreeUpdateRunnable final : public nsRunnable { uint64_t mLayersId; bool mActive; @@ -3246,17 +3246,17 @@ TabParent::RecvInvokeDragSession(nsTArra const uint32_t& aWidth, const uint32_t& aHeight, const uint32_t& aStride, const uint8_t& aFormat, const int32_t& aDragAreaX, const int32_t& aDragAreaY) { mInitialDataTransferItems.Clear(); nsIPresShell* shell = mFrameElement->OwnerDoc()->GetShell(); if (!shell) { if (Manager()->IsContentParent()) { - unused << Manager()->AsContentParent()->SendEndDragSession(true, true); + Unused << Manager()->AsContentParent()->SendEndDragSession(true, true); } return true; } EventStateManager* esm = shell->GetPresContext()->EventStateManager(); for (uint32_t i = 0; i < aTransfers.Length(); ++i) { auto& items = aTransfers[i].items(); nsTArray<DataTransferItem>* itemArray = mInitialDataTransferItems.AppendElement();
--- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -117,19 +117,19 @@ nsIContentParent::CanOpenBrowser(const I PBrowserParent* nsIContentParent::AllocPBrowserParent(const TabId& aTabId, const IPCTabContext& aContext, const uint32_t& aChromeFlags, const ContentParentId& aCpId, const bool& aIsForApp, const bool& aIsForBrowser) { - unused << aCpId; - unused << aIsForApp; - unused << aIsForBrowser; + Unused << aCpId; + Unused << aIsForApp; + Unused << aIsForBrowser; if (!CanOpenBrowser(aContext)) { return nullptr; } uint32_t chromeFlags = aChromeFlags; if (aContext.type() == IPCTabContext::TPopupIPCTabContext) { // CanOpenBrowser has ensured that the IPCTabContext is of
--- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -1686,17 +1686,17 @@ MediaManager::NotifyRecordingStatusChang obs->NotifyObservers(static_cast<nsIPropertyBag2*>(props), "recording-device-events", aMsg.get()); // Forward recording events to parent process. // The events are gathered in chrome process and used for recording indicator if (!XRE_IsParentProcess()) { - unused << + Unused << dom::ContentChild::GetSingleton()->SendRecordingDeviceEvents(aMsg, requestURL, aIsAudio, aIsVideo); } return NS_OK; }
--- a/dom/media/MediaManager.h +++ b/dom/media/MediaManager.h @@ -129,17 +129,17 @@ public: , mStopped(false) , mFinished(false) , mRemoved(false) , mAudioStopped(false) , mVideoStopped(false) {} ~GetUserMediaCallbackMediaStreamListener() { - unused << mMediaThread; + Unused << mMediaThread; // It's OK to release mStream on any thread; they have thread-safe // refcounts. } void Activate(already_AddRefed<SourceMediaStream> aStream, AudioDevice* aAudioDevice, VideoDevice* aVideoDevice) {
--- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -2505,17 +2505,17 @@ ProcessedMediaStream::AllocateInputPort( explicit Message(MediaInputPort* aPort) : ControlMessage(aPort->GetDestination()), mPort(aPort) {} virtual void Run() { mPort->Init(); // The graph holds its reference implicitly mPort->GraphImpl()->SetStreamOrderDirty(); - unused << mPort.forget(); + Unused << mPort.forget(); } virtual void RunDuringShutdown() { Run(); } RefPtr<MediaInputPort> mPort; };
--- a/dom/media/gmp/GMPAudioDecoderChild.cpp +++ b/dom/media/gmp/GMPAudioDecoderChild.cpp @@ -47,51 +47,51 @@ GMPAudioDecoderChild::Decoded(GMPAudioSa GMPAudioDecodedSampleData samples; samples.mData().AppendElements((int16_t*)aDecodedSamples->Buffer(), aDecodedSamples->Size() / sizeof(int16_t)); samples.mTimeStamp() = aDecodedSamples->TimeStamp(); samples.mChannelCount() = aDecodedSamples->Channels(); samples.mSamplesPerSecond() = aDecodedSamples->Rate(); - unused << SendDecoded(samples); + Unused << SendDecoded(samples); aDecodedSamples->Destroy(); } void GMPAudioDecoderChild::InputDataExhausted() { MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current()); - unused << SendInputDataExhausted(); + Unused << SendInputDataExhausted(); } void GMPAudioDecoderChild::DrainComplete() { MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current()); - unused << SendDrainComplete(); + Unused << SendDrainComplete(); } void GMPAudioDecoderChild::ResetComplete() { MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current()); - unused << SendResetComplete(); + Unused << SendResetComplete(); } void GMPAudioDecoderChild::Error(GMPErr aError) { MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current()); - unused << SendError(aError); + Unused << SendError(aError); } bool GMPAudioDecoderChild::RecvInitDecode(const GMPAudioCodecData& a) { MOZ_ASSERT(mAudioDecoder); if (!mAudioDecoder) { return false; @@ -158,15 +158,15 @@ GMPAudioDecoderChild::RecvDecodingComple if (mAudioDecoder) { // Ignore any return code. It is OK for this to fail without killing the process. mAudioDecoder->DecodingComplete(); mAudioDecoder = nullptr; } mPlugin = nullptr; - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } } // namespace gmp } // namespace mozilla
--- a/dom/media/gmp/GMPAudioDecoderParent.cpp +++ b/dom/media/gmp/GMPAudioDecoderParent.cpp @@ -191,17 +191,17 @@ GMPAudioDecoderParent::Shutdown() // Notify client we're gone! Won't occur after Close() if (mCallback) { mCallback->Terminated(); mCallback = nullptr; } mIsOpen = false; if (!mActorDestroyed) { - unused << SendDecodingComplete(); + Unused << SendDecodingComplete(); } return NS_OK; } // Note: Keep this sync'd up with DecodingComplete void GMPAudioDecoderParent::ActorDestroy(ActorDestroyReason aWhy)
--- a/dom/media/gmp/GMPContentParent.cpp +++ b/dom/media/gmp/GMPContentParent.cpp @@ -90,27 +90,27 @@ GMPContentParent::AudioDecoderDestroyed( } void GMPContentParent::VideoDecoderDestroyed(GMPVideoDecoderParent* aDecoder) { MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); // If the constructor fails, we'll get called before it's added - unused << NS_WARN_IF(!mVideoDecoders.RemoveElement(aDecoder)); + Unused << NS_WARN_IF(!mVideoDecoders.RemoveElement(aDecoder)); CloseIfUnused(); } void GMPContentParent::VideoEncoderDestroyed(GMPVideoEncoderParent* aEncoder) { MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); // If the constructor fails, we'll get called before it's added - unused << NS_WARN_IF(!mVideoEncoders.RemoveElement(aEncoder)); + Unused << NS_WARN_IF(!mVideoEncoders.RemoveElement(aEncoder)); CloseIfUnused(); } void GMPContentParent::DecryptorDestroyed(GMPDecryptorParent* aSession) { MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
--- a/dom/media/gmp/GMPDecryptorChild.cpp +++ b/dom/media/gmp/GMPDecryptorChild.cpp @@ -355,17 +355,17 @@ GMPDecryptorChild::RecvDecryptingComplet mSession = nullptr; if (!session) { return false; } session->DecryptingComplete(); - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } } // namespace gmp } // namespace mozilla // avoid redefined macro in unified build
--- a/dom/media/gmp/GMPDecryptorParent.cpp +++ b/dom/media/gmp/GMPDecryptorParent.cpp @@ -68,97 +68,97 @@ GMPDecryptorParent::CreateSession(uint32 this, aCreateSessionToken, aPromiseId, ToBase64(aInitData).get())); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aInitDataType.IsEmpty() && !aInitData.IsEmpty()); - unused << SendCreateSession(aCreateSessionToken, aPromiseId, aInitDataType, aInitData, aSessionType); + Unused << SendCreateSession(aCreateSessionToken, aPromiseId, aInitDataType, aInitData, aSessionType); } void GMPDecryptorParent::LoadSession(uint32_t aPromiseId, const nsCString& aSessionId) { LOGD(("GMPDecryptorParent[%p]::LoadSession(sessionId='%s', promiseId=%u)", this, aSessionId.get(), aPromiseId)); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aSessionId.IsEmpty()); - unused << SendLoadSession(aPromiseId, aSessionId); + Unused << SendLoadSession(aPromiseId, aSessionId); } void GMPDecryptorParent::UpdateSession(uint32_t aPromiseId, const nsCString& aSessionId, const nsTArray<uint8_t>& aResponse) { LOGD(("GMPDecryptorParent[%p]::UpdateSession(sessionId='%s', promiseId=%u response='%s')", this, aSessionId.get(), aPromiseId, ToBase64(aResponse).get())); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aSessionId.IsEmpty() && !aResponse.IsEmpty()); - unused << SendUpdateSession(aPromiseId, aSessionId, aResponse); + Unused << SendUpdateSession(aPromiseId, aSessionId, aResponse); } void GMPDecryptorParent::CloseSession(uint32_t aPromiseId, const nsCString& aSessionId) { LOGD(("GMPDecryptorParent[%p]::CloseSession(sessionId='%s', promiseId=%u)", this, aSessionId.get(), aPromiseId)); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aSessionId.IsEmpty()); - unused << SendCloseSession(aPromiseId, aSessionId); + Unused << SendCloseSession(aPromiseId, aSessionId); } void GMPDecryptorParent::RemoveSession(uint32_t aPromiseId, const nsCString& aSessionId) { LOGD(("GMPDecryptorParent[%p]::RemoveSession(sessionId='%s', promiseId=%u)", this, aSessionId.get(), aPromiseId)); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aSessionId.IsEmpty()); - unused << SendRemoveSession(aPromiseId, aSessionId); + Unused << SendRemoveSession(aPromiseId, aSessionId); } void GMPDecryptorParent::SetServerCertificate(uint32_t aPromiseId, const nsTArray<uint8_t>& aServerCert) { LOGD(("GMPDecryptorParent[%p]::SetServerCertificate(promiseId=%u)", this, aPromiseId)); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in from JS are valid. MOZ_ASSERT(!aServerCert.IsEmpty()); - unused << SendSetServerCertificate(aPromiseId, aServerCert); + Unused << SendSetServerCertificate(aPromiseId, aServerCert); } void GMPDecryptorParent::Decrypt(uint32_t aId, const CryptoSample& aCrypto, const nsTArray<uint8_t>& aBuffer) { LOGV(("GMPDecryptorParent[%p]::Decrypt(id=%d)", this, aId)); @@ -172,17 +172,17 @@ GMPDecryptorParent::Decrypt(uint32_t aId MOZ_ASSERT(!aBuffer.IsEmpty() && aCrypto.mValid); GMPDecryptionData data(aCrypto.mKeyId, aCrypto.mIV, aCrypto.mPlainSizes, aCrypto.mEncryptedSizes, aCrypto.mSessionIds); - unused << SendDecrypt(aId, aBuffer, data); + Unused << SendDecrypt(aId, aBuffer, data); } bool GMPDecryptorParent::RecvSetSessionId(const uint32_t& aCreateSessionId, const nsCString& aSessionId) { LOGD(("GMPDecryptorParent[%p]::RecvSetSessionId(token=%u, sessionId='%s')", this, aCreateSessionId, aSessionId.get())); @@ -408,17 +408,17 @@ GMPDecryptorParent::Shutdown() // Notify client we're gone! Won't occur after Close() if (mCallback) { mCallback->Terminated(); mCallback = nullptr; } mIsOpen = false; if (!mActorDestroyed) { - unused << SendDecryptingComplete(); + Unused << SendDecryptingComplete(); } } // Note: Keep this sync'd up with Shutdown void GMPDecryptorParent::ActorDestroy(ActorDestroyReason aWhy) { LOGD(("GMPDecryptorParent[%p]::ActorDestroy(reason=%d)", this, aWhy));
--- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -117,17 +117,17 @@ GMPParent::Init(GeckoMediaPluginServiceP return ReadGMPMetaData(); } void GMPParent::Crash() { if (mState != GMPStateNotLoaded) { - unused << SendCrashPluginNow(); + Unused << SendCrashPluginNow(); } } nsresult GMPParent::LoadProcess() { MOZ_ASSERT(mDirectory, "Plugin directory cannot be NULL!"); MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); @@ -228,17 +228,17 @@ GMPParent::EnsureAsyncShutdownTimeoutSet RefPtr<GeckoMediaPluginServiceParent> service = GeckoMediaPluginServiceParent::GetSingleton(); if (service) { timeout = service->AsyncShutdownTimeoutMs(); } rv = mAsyncShutdownTimeout->InitWithFuncCallback( &AbortWaitingForGMPAsyncShutdown, this, timeout, nsITimer::TYPE_ONE_SHOT); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); return rv; } bool GMPParent::RecvPGMPContentChildDestroyed() { --mGMPContentChildCount; if (!IsUsed()) {
--- a/dom/media/gmp/GMPStorageParent.cpp +++ b/dom/media/gmp/GMPStorageParent.cpp @@ -615,39 +615,39 @@ GMPStorageParent::RecvOpen(const nsCStri return false; } if (mNodeId.EqualsLiteral("null")) { // Refuse to open storage if the page is opened from local disk, // or shared across origin. LOGD(("GMPStorageParent[%p]::RecvOpen(record='%s') failed; null nodeId", this, aRecordName.get())); - unused << SendOpenComplete(aRecordName, GMPGenericErr); + Unused << SendOpenComplete(aRecordName, GMPGenericErr); return true; } if (aRecordName.IsEmpty()) { LOGD(("GMPStorageParent[%p]::RecvOpen(record='%s') failed; record name empty", this, aRecordName.get())); - unused << SendOpenComplete(aRecordName, GMPGenericErr); + Unused << SendOpenComplete(aRecordName, GMPGenericErr); return true; } if (mStorage->IsOpen(aRecordName)) { LOGD(("GMPStorageParent[%p]::RecvOpen(record='%s') failed; record in use", this, aRecordName.get())); - unused << SendOpenComplete(aRecordName, GMPRecordInUse); + Unused << SendOpenComplete(aRecordName, GMPRecordInUse); return true; } auto err = mStorage->Open(aRecordName); MOZ_ASSERT(GMP_FAILED(err) || mStorage->IsOpen(aRecordName)); LOGD(("GMPStorageParent[%p]::RecvOpen(record='%s') complete; rv=%d", this, aRecordName.get(), err)); - unused << SendOpenComplete(aRecordName, err); + Unused << SendOpenComplete(aRecordName, err); return true; } bool GMPStorageParent::RecvRead(const nsCString& aRecordName) { LOGD(("GMPStorageParent[%p]::RecvRead(record='%s')", @@ -656,22 +656,22 @@ GMPStorageParent::RecvRead(const nsCStri if (mShutdown) { return false; } nsTArray<uint8_t> data; if (!mStorage->IsOpen(aRecordName)) { LOGD(("GMPStorageParent[%p]::RecvRead(record='%s') failed; record not open", this, aRecordName.get())); - unused << SendReadComplete(aRecordName, GMPClosedErr, data); + Unused << SendReadComplete(aRecordName, GMPClosedErr, data); } else { GMPErr rv = mStorage->Read(aRecordName, data); LOGD(("GMPStorageParent[%p]::RecvRead(record='%s') read %d bytes rv=%d", this, aRecordName.get(), data.Length(), rv)); - unused << SendReadComplete(aRecordName, rv, data); + Unused << SendReadComplete(aRecordName, rv, data); } return true; } bool GMPStorageParent::RecvWrite(const nsCString& aRecordName, InfallibleTArray<uint8_t>&& aBytes) @@ -681,32 +681,32 @@ GMPStorageParent::RecvWrite(const nsCStr if (mShutdown) { return false; } if (!mStorage->IsOpen(aRecordName)) { LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') failed record not open", this, aRecordName.get())); - unused << SendWriteComplete(aRecordName, GMPClosedErr); + Unused << SendWriteComplete(aRecordName, GMPClosedErr); return true; } if (aBytes.Length() > GMP_MAX_RECORD_SIZE) { LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') failed record too big", this, aRecordName.get())); - unused << SendWriteComplete(aRecordName, GMPQuotaExceededErr); + Unused << SendWriteComplete(aRecordName, GMPQuotaExceededErr); return true; } GMPErr rv = mStorage->Write(aRecordName, aBytes); LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') write complete rv=%d", this, aRecordName.get(), rv)); - unused << SendWriteComplete(aRecordName, rv); + Unused << SendWriteComplete(aRecordName, rv); return true; } bool GMPStorageParent::RecvGetRecordNames() { if (mShutdown) { @@ -714,17 +714,17 @@ GMPStorageParent::RecvGetRecordNames() } nsTArray<nsCString> recordNames; GMPErr status = mStorage->GetRecordNames(recordNames); LOGD(("GMPStorageParent[%p]::RecvGetRecordNames() status=%d numRecords=%d", this, status, recordNames.Length())); - unused << SendRecordNames(recordNames, status); + Unused << SendRecordNames(recordNames, status); return true; } bool GMPStorageParent::RecvClose(const nsCString& aRecordName) { LOGD(("GMPStorageParent[%p]::RecvClose(record='%s')", @@ -750,16 +750,16 @@ void GMPStorageParent::Shutdown() { LOGD(("GMPStorageParent[%p]::Shutdown()", this)); if (mShutdown) { return; } mShutdown = true; - unused << SendShutdown(); + Unused << SendShutdown(); mStorage = nullptr; } } // namespace gmp } // namespace mozilla
--- a/dom/media/gmp/GMPTimerParent.cpp +++ b/dom/media/gmp/GMPTimerParent.cpp @@ -109,14 +109,14 @@ GMPTimerParent::TimerExpired(Context* aC if (!mIsOpen) { return; } uint32_t id = aContext->mId; mTimers.RemoveEntry(aContext); if (id) { - unused << SendTimerExpired(id); + Unused << SendTimerExpired(id); } } } // namespace gmp } // namespace mozilla
--- a/dom/media/gmp/GMPVideoDecoderChild.cpp +++ b/dom/media/gmp/GMPVideoDecoderChild.cpp @@ -203,17 +203,17 @@ GMPVideoDecoderChild::RecvDecodingComple mVideoDecoder->DecodingComplete(); mVideoDecoder = nullptr; } mVideoHost.DoneWithAPI(); mPlugin = nullptr; - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } bool GMPVideoDecoderChild::Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType, Shmem* aMem)
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp +++ b/dom/media/gmp/GMPVideoDecoderParent.cpp @@ -259,17 +259,17 @@ GMPVideoDecoderParent::Shutdown() // Notify client we're gone! Won't occur after Close() if (mCallback) { mCallback->Terminated(); mCallback = nullptr; } mIsOpen = false; if (!mActorDestroyed) { - unused << SendDecodingComplete(); + Unused << SendDecodingComplete(); } return NS_OK; } // Note: Keep this sync'd up with Shutdown void GMPVideoDecoderParent::ActorDestroy(ActorDestroyReason aWhy)
--- a/dom/media/gmp/GMPVideoEncoderChild.cpp +++ b/dom/media/gmp/GMPVideoEncoderChild.cpp @@ -173,28 +173,28 @@ GMPVideoEncoderChild::RecvEncodingComple // return a frame they can use. Don't call the GMP's EncodingComplete() // now and don't delete the GMPVideoEncoderChild, defer processing the // EncodingComplete() until once the Alloc() finishes. mPendingEncodeComplete = true; return true; } if (!mVideoEncoder) { - unused << Send__delete__(this); + Unused << Send__delete__(this); return false; } // Ignore any return code. It is OK for this to fail without killing the process. mVideoEncoder->EncodingComplete(); mVideoHost.DoneWithAPI(); mPlugin = nullptr; - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } bool GMPVideoEncoderChild::Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType, Shmem* aMem)
--- a/dom/media/gmp/GMPVideoEncoderParent.cpp +++ b/dom/media/gmp/GMPVideoEncoderParent.cpp @@ -228,17 +228,17 @@ GMPVideoEncoderParent::Shutdown() if (mCallback) { mCallback->Terminated(); mCallback = nullptr; } mVideoHost.DoneWithAPI(); mIsOpen = false; if (!mActorDestroyed) { - unused << SendEncodingComplete(); + Unused << SendEncodingComplete(); } } static void ShutdownEncodedThread(nsCOMPtr<nsIThread>& aThread) { aThread->Shutdown(); }
--- a/dom/media/gstreamer/GStreamerReader.cpp +++ b/dom/media/gstreamer/GStreamerReader.cpp @@ -947,17 +947,17 @@ media::TimeIntervals GStreamerReader::Ge } return buffered; } void GStreamerReader::ReadAndPushData(guint aLength) { int64_t offset1 = mResource.Tell(); - unused << offset1; + Unused << offset1; nsresult rv = NS_OK; GstBuffer* buffer = gst_buffer_new_and_alloc(aLength); #if GST_VERSION_MAJOR >= 1 GstMapInfo info; gst_buffer_map(buffer, &info, GST_MAP_WRITE); guint8 *data = info.data; #else @@ -969,17 +969,17 @@ void GStreamerReader::ReadAndPushData(gu aLength - bytesRead, &size); if (NS_FAILED(rv) || size == 0) break; bytesRead += size; } int64_t offset2 = mResource.Tell(); - unused << offset2; + Unused << offset2; #if GST_VERSION_MAJOR >= 1 gst_buffer_unmap(buffer, &info); gst_buffer_set_size(buffer, bytesRead); #else GST_BUFFER_SIZE(buffer) = bytesRead; #endif
--- a/dom/media/gtest/TestMediaFormatReader.cpp +++ b/dom/media/gtest/TestMediaFormatReader.cpp @@ -148,17 +148,17 @@ bool GetPref<bool>(const char* aPrefKey) } template <typename T> void SetPref(const char* a, T value); template <> void SetPref<bool>(const char* aPrefKey, bool aValue) { - unused << Preferences::SetBool(aPrefKey, aValue); + Unused << Preferences::SetBool(aPrefKey, aValue); } template <typename T> class PreferencesRAII { public: explicit PreferencesRAII(const char* aPrefKey, T aValue) : mPrefKey(aPrefKey) @@ -237,9 +237,9 @@ TEST(MediaFormatReader, RequestVideoRawD b->mReader.get(), __func__, &MediaDecoderReader::AsyncReadMetadata) ->Then(b->mReader->OwnerThread(), __func__, b.get(), &MediaFormatReaderBinding::OnMetadataReadVideo, &MediaFormatReaderBinding::OnMetadataNotRead); }; b->RunTestAndWait(testCase); -} \ No newline at end of file +}
--- a/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp +++ b/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp @@ -87,53 +87,53 @@ public: Input(aDecrypted.mSample); } else if (GMP_FAILED(aDecrypted.mStatus)) { if (mCallback) { mCallback->Error(); } } else { MOZ_ASSERT(!mIsShutdown); nsresult rv = mDecoder->Input(aDecrypted.mSample); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); } } nsresult Flush() override { MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); MOZ_ASSERT(!mIsShutdown); for (auto iter = mDecrypts.Iter(); !iter.Done(); iter.Next()) { nsAutoPtr<DecryptPromiseRequestHolder>& holder = iter.Data(); holder->DisconnectIfExists(); iter.Remove(); } nsresult rv = mDecoder->Flush(); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); mSamplesWaitingForKey->Flush(); return rv; } nsresult Drain() override { MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); MOZ_ASSERT(!mIsShutdown); for (auto iter = mDecrypts.Iter(); !iter.Done(); iter.Next()) { nsAutoPtr<DecryptPromiseRequestHolder>& holder = iter.Data(); holder->DisconnectIfExists(); iter.Remove(); } nsresult rv = mDecoder->Drain(); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); return rv; } nsresult Shutdown() override { MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); MOZ_ASSERT(!mIsShutdown); mIsShutdown = true; nsresult rv = mDecoder->Shutdown(); - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); mSamplesWaitingForKey->BreakCycles(); mSamplesWaitingForKey = nullptr; mDecoder = nullptr; mProxy = nullptr; mCallback = nullptr; return rv; }
--- a/dom/media/systemservices/CamerasChild.cpp +++ b/dom/media/systemservices/CamerasChild.cpp @@ -625,17 +625,17 @@ CamerasChild::Shutdown() OffTheBooksMutexAutoLock lock(CamerasSingleton::Mutex()); if (CamerasSingleton::Thread()) { LOG(("Dispatching actor deletion")); // Delete the parent actor. RefPtr<nsRunnable> deleteRunnable = // CamerasChild (this) will remain alive and is only deleted by the // IPC layer when SendAllDone returns. media::NewRunnableFrom([this]() -> nsresult { - unused << this->SendAllDone(); + Unused << this->SendAllDone(); return NS_OK; }); CamerasSingleton::Thread()->Dispatch(deleteRunnable, NS_DISPATCH_NORMAL); LOG(("PBackground thread exists, dispatching close")); // Dispatch closing the IPC thread back to us when the // BackgroundChild is closed. RefPtr<nsRunnable> event = new ThreadDestructor(CamerasSingleton::Thread());
--- a/dom/media/systemservices/CamerasParent.cpp +++ b/dom/media/systemservices/CamerasParent.cpp @@ -400,17 +400,17 @@ CamerasParent::CloseEngines() MOZ_ASSERT(mVideoCaptureThread->thread_id() == PlatformThread::CurrentId()); // Stop the callers while (mCallbacks.Length()) { auto capEngine = mCallbacks[0]->mCapEngine; auto capNum = mCallbacks[0]->mCapturerId; LOG(("Forcing shutdown of engine %d, capturer %d", capEngine, capNum)); StopCapture(capEngine, capNum); - unused << ReleaseCaptureDevice(capEngine, capNum); + Unused << ReleaseCaptureDevice(capEngine, capNum); } for (int i = 0; i < CaptureEngine::MaxEngine; i++) { if (mEngines[i].mEngineIsRunning) { LOG(("Being closed down while engine %d is running!", i)); } if (mEngines[i].mPtrViERender) { mEngines[i].mPtrViERender->Release(); @@ -470,21 +470,21 @@ CamerasParent::RecvNumberOfCaptureDevice } RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, num]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (num < 0) { LOG(("RecvNumberOfCaptureDevices couldn't find devices")); - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } else { LOG(("RecvNumberOfCaptureDevices: %d", num)); - unused << self->SendReplyNumberOfCaptureDevices(num); + Unused << self->SendReplyNumberOfCaptureDevices(num); return NS_OK; } }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true; @@ -509,22 +509,22 @@ CamerasParent::RecvNumberOfCapabilities( } RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, num]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (num < 0) { LOG(("RecvNumberOfCapabilities couldn't find capabilities")); - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } else { LOG(("RecvNumberOfCapabilities: %d", num)); } - unused << self->SendReplyNumberOfCapabilities(num); + Unused << self->SendReplyNumberOfCapabilities(num); return NS_OK; }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true; } @@ -561,20 +561,20 @@ CamerasParent::RecvGetCaptureCapability( LOG(("Capability: %u %u %u %u %d %d", webrtcCaps.width, webrtcCaps.height, webrtcCaps.maxFPS, webrtcCaps.expectedCaptureDelay, webrtcCaps.rawType, webrtcCaps.codecType)); if (error) { - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } - unused << self->SendReplyGetCaptureCapability(capCap); + Unused << self->SendReplyGetCaptureCapability(capCap); return NS_OK; }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true; } @@ -606,22 +606,22 @@ CamerasParent::RecvGetCaptureDevice(cons } RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, error, name, uniqueId]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (error) { LOG(("GetCaptureDevice failed: %d", error)); - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } LOG(("Returning %s name %s id", name.get(), uniqueId.get())); - unused << self->SendReplyGetCaptureDevice(name, uniqueId); + Unused << self->SendReplyGetCaptureDevice(name, uniqueId); return NS_OK; }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true; } @@ -642,21 +642,21 @@ CamerasParent::RecvAllocateCaptureDevice unique_id.get(), MediaEngineSource::kMaxUniqueIdLength, numdev); } RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, numdev, error]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (error) { - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } else { LOG(("Allocated device nr %d", numdev)); - unused << self->SendReplyAllocateCaptureDevice(numdev); + Unused << self->SendReplyAllocateCaptureDevice(numdev); return NS_OK; } }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true; @@ -685,20 +685,20 @@ CamerasParent::RecvReleaseCaptureDevice( media::NewRunnableFrom([self, aCapEngine, numdev]() -> nsresult { int error = self->ReleaseCaptureDevice(aCapEngine, numdev); RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, error, numdev]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (error) { - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } else { - unused << self->SendReplySuccess(); + Unused << self->SendReplySuccess(); LOG(("Freed device nr %d", numdev)); return NS_OK; } }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); @@ -748,20 +748,20 @@ CamerasParent::RecvStartCapture(const in } } RefPtr<nsIRunnable> ipc_runnable = media::NewRunnableFrom([self, error]() -> nsresult { if (self->IsShuttingDown()) { return NS_ERROR_FAILURE; } if (!error) { - unused << self->SendReplySuccess(); + Unused << self->SendReplySuccess(); return NS_OK; } else { - unused << self->SendReplyFailure(); + Unused << self->SendReplyFailure(); return NS_ERROR_FAILURE; } }); self->mPBackgroundThread->Dispatch(ipc_runnable, NS_DISPATCH_NORMAL); return NS_OK; }); DispatchToVideoCaptureThread(webrtc_runnable); return true;
--- a/dom/media/systemservices/MediaParent.cpp +++ b/dom/media/systemservices/MediaParent.cpp @@ -442,17 +442,17 @@ Parent<Super>::RecvGetOriginKey(const ui return false; } p->Then([aRequestId, sameProcess](const nsCString& aKey) mutable { if (!sameProcess) { if (!sIPCServingParent) { return NS_OK; } - unused << sIPCServingParent->SendGetOriginKeyResponse(aRequestId, aKey); + Unused << sIPCServingParent->SendGetOriginKeyResponse(aRequestId, aKey); } else { RefPtr<MediaManager> mgr = MediaManager::GetInstance(); if (!mgr) { return NS_OK; } RefPtr<Pledge<nsCString>> pledge = mgr->mGetOriginKeyPledges.Remove(aRequestId); if (pledge) {
--- a/dom/media/systemservices/MediaSystemResourceManagerParent.cpp +++ b/dom/media/systemservices/MediaSystemResourceManagerParent.cpp @@ -27,17 +27,17 @@ bool MediaSystemResourceManagerParent::RecvAcquire(const uint32_t& aId, const MediaSystemResourceType& aResourceType, const bool& aWillWait) { MediaSystemResourceRequest* request = mResourceRequests.Get(aId); MOZ_ASSERT(!request); if (request) { // Send fail response - mozilla::unused << SendResponse(aId, false /* fail */); + mozilla::Unused << SendResponse(aId, false /* fail */); return true; } request = new MediaSystemResourceRequest(aId, aResourceType); mResourceRequests.Put(aId, request); mMediaSystemResourceService->Acquire(this, aId, aResourceType, aWillWait); return true; }
--- a/dom/media/systemservices/MediaSystemResourceService.cpp +++ b/dom/media/systemservices/MediaSystemResourceService.cpp @@ -90,32 +90,32 @@ MediaSystemResourceService::Acquire(medi } MediaSystemResource* resource = mResources.Get(static_cast<uint32_t>(aResourceType)); if (!resource || resource->mResourceCount == 0) { // Resource does not exit // Send fail response - mozilla::unused << aParent->SendResponse(aId, false /* fail */); + mozilla::Unused << aParent->SendResponse(aId, false /* fail */); return; } // Try to acquire a resource if (resource->mAcquiredRequests.size() < resource->mResourceCount) { // Resource is available resource->mAcquiredRequests.push_back( MediaSystemResourceRequest(aParent, aId)); // Send success response - mozilla::unused << aParent->SendResponse(aId, true /* success */); + mozilla::Unused << aParent->SendResponse(aId, true /* success */); return; } else if (!aWillWait) { // Resource is not available and do not wait. // Send fail response - mozilla::unused << aParent->SendResponse(aId, false /* fail */); + mozilla::Unused << aParent->SendResponse(aId, false /* fail */); return; } // Wait until acquire. resource->mWaitingRequests.push_back( MediaSystemResourceRequest(aParent, aId)); } void @@ -241,16 +241,16 @@ MediaSystemResourceService::UpdateReques std::deque<MediaSystemResourceRequest>& waitingRequests = resource->mWaitingRequests; while ((acquiredRequests.size() < resource->mResourceCount) && (waitingRequests.size() > 0)) { MediaSystemResourceRequest& request = waitingRequests.front(); MOZ_ASSERT(request.mParent); // Send response - mozilla::unused << request.mParent->SendResponse(request.mId, true /* success */); + mozilla::Unused << request.mParent->SendResponse(request.mId, true /* success */); // Move request to mAcquiredRequests acquiredRequests.push_back(waitingRequests.front()); waitingRequests.pop_front(); } } } // namespace mozilla
--- a/dom/media/webaudio/AnalyserNode.cpp +++ b/dom/media/webaudio/AnalyserNode.cpp @@ -113,17 +113,17 @@ AnalyserNode::AnalyserNode(AudioContext* { mStream = AudioNodeStream::Create(aContext, new AnalyserNodeEngine(this), AudioNodeStream::NO_STREAM_FLAGS); // Enough chunks must be recorded to handle the case of fftSize being // increased to maximum immediately before getFloatTimeDomainData() is // called, for example. - unused << mChunks.SetLength(CHUNK_COUNT, fallible); + Unused << mChunks.SetLength(CHUNK_COUNT, fallible); AllocateBuffer(); } size_t AnalyserNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const { size_t amount = AudioNode::SizeOfExcludingThis(aMallocSizeOf);
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp +++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp @@ -339,17 +339,17 @@ nsSynthVoiceRegistry::RemoveVoice(nsISpe mUseGlobalQueue = false; } } nsTArray<SpeechSynthesisParent*> ssplist; GetAllSpeechSynthActors(ssplist); for (uint32_t i = 0; i < ssplist.Length(); ++i) - unused << ssplist[i]->SendVoiceRemoved(nsString(aUri)); + Unused << ssplist[i]->SendVoiceRemoved(nsString(aUri)); return NS_OK; } NS_IMETHODIMP nsSynthVoiceRegistry::SetDefaultVoice(const nsAString& aUri, bool aIsDefault) { @@ -369,17 +369,17 @@ nsSynthVoiceRegistry::SetDefaultVoice(co mDefaultVoices.AppendElement(retval); } if (XRE_IsParentProcess()) { nsTArray<SpeechSynthesisParent*> ssplist; GetAllSpeechSynthActors(ssplist); for (uint32_t i = 0; i < ssplist.Length(); ++i) { - unused << ssplist[i]->SendSetDefaultVoice(nsString(aUri), aIsDefault); + Unused << ssplist[i]->SendSetDefaultVoice(nsString(aUri), aIsDefault); } } return NS_OK; } NS_IMETHODIMP nsSynthVoiceRegistry::GetVoiceCount(uint32_t* aRetval) @@ -489,17 +489,17 @@ nsSynthVoiceRegistry::AddVoiceImpl(nsISp if (!ssplist.IsEmpty()) { mozilla::dom::RemoteVoice ssvoice(nsString(aUri), nsString(aName), nsString(aLang), aLocalService, aQueuesUtterances); for (uint32_t i = 0; i < ssplist.Length(); ++i) { - unused << ssplist[i]->SendVoiceAdded(ssvoice); + Unused << ssplist[i]->SendVoiceAdded(ssvoice); } } return NS_OK; } bool nsSynthVoiceRegistry::FindVoiceByLang(const nsAString& aLang, @@ -739,17 +739,17 @@ nsSynthVoiceRegistry::SetIsSpeaking(bool MOZ_ASSERT(XRE_IsParentProcess()); // Only set to 'true' if global queue is enabled. mIsSpeaking = aIsSpeaking && (mUseGlobalQueue || sForceGlobalQueue); nsTArray<SpeechSynthesisParent*> ssplist; GetAllSpeechSynthActors(ssplist); for (uint32_t i = 0; i < ssplist.Length(); ++i) { - unused << ssplist[i]->SendIsSpeakingChanged(aIsSpeaking); + Unused << ssplist[i]->SendIsSpeakingChanged(aIsSpeaking); } } void nsSynthVoiceRegistry::SpeakImpl(VoiceData* aVoice, nsSpeechTask* aTask, const nsAString& aText, const float& aVolume,
--- a/dom/messagechannel/MessagePort.cpp +++ b/dom/messagechannel/MessagePort.cpp @@ -235,17 +235,17 @@ class ForceCloseHelper final : public ns public: NS_DECL_ISUPPORTS static void ForceClose(const MessagePortIdentifier& aIdentifier) { PBackgroundChild* actor = mozilla::ipc::BackgroundChild::GetForCurrentThread(); if (actor) { - unused << actor->SendMessagePortForceClose(aIdentifier.uuid(), + Unused << actor->SendMessagePortForceClose(aIdentifier.uuid(), aIdentifier.destinationUuid(), aIdentifier.sequenceId()); return; } RefPtr<ForceCloseHelper> helper = new ForceCloseHelper(aIdentifier); if (NS_WARN_IF(!mozilla::ipc::BackgroundChild::GetOrCreateForCurrentThread(helper))) { MOZ_CRASH();
--- a/dom/messagechannel/MessagePortParent.cpp +++ b/dom/messagechannel/MessagePortParent.cpp @@ -98,17 +98,17 @@ MessagePortParent::RecvDisentangle(nsTAr bool MessagePortParent::RecvStopSendingData() { if (!mEntangled) { return true; } mCanSendData = false; - unused << SendStopSendingDataConfirmed(); + Unused << SendStopSendingDataConfirmed(); return true; } bool MessagePortParent::RecvClose() { if (mService) { MOZ_ASSERT(mEntangled); @@ -117,17 +117,17 @@ MessagePortParent::RecvClose() return false; } Close(); } MOZ_ASSERT(!mEntangled); - unused << Send__delete__(this); + Unused << Send__delete__(this); return true; } void MessagePortParent::ActorDestroy(ActorDestroyReason aWhy) { if (mService && mEntangled) { // When the last parent is deleted, this service is freed but this cannot @@ -144,17 +144,17 @@ MessagePortParent::Entangled(const nsTAr mEntangled = true; return SendEntangled(aMessages); } void MessagePortParent::CloseAndDelete() { Close(); - unused << Send__delete__(this); + Unused << Send__delete__(this); } void MessagePortParent::Close() { mService = nullptr; mEntangled = false; }
--- a/dom/messagechannel/MessagePortService.cpp +++ b/dom/messagechannel/MessagePortService.cpp @@ -202,17 +202,17 @@ MessagePortService::DisentanglePort( FallibleTArray<MessagePortMessage> array; if (!SharedMessagePortMessage::FromSharedToMessagesParent(data->mParent, aMessages, array)) { return false; } - unused << data->mParent->Entangled(array); + Unused << data->mParent->Entangled(array); return true; } bool MessagePortService::ClosePort(MessagePortParent* aParent) { MessagePortServiceData* data; if (!mPorts.Get(aParent->ID(), &data)) { @@ -320,17 +320,17 @@ MessagePortService::PostMessages( FallibleTArray<MessagePortMessage> messages; if (!SharedMessagePortMessage::FromSharedToMessagesParent(data->mParent, data->mMessages, messages)) { return false; } data->mMessages.Clear(); - unused << data->mParent->SendReceiveData(messages); + Unused << data->mParent->SendReceiveData(messages); } return true; } void MessagePortService::ParentDestroy(MessagePortParent* aParent) {
--- a/dom/mobilemessage/ipc/SmsIPCService.cpp +++ b/dom/mobilemessage/ipc/SmsIPCService.cpp @@ -68,17 +68,17 @@ SendCursorRequest(const IPCMobileMessage NS_ENSURE_TRUE(smsChild, NS_ERROR_FAILURE); RefPtr<MobileMessageCursorChild> actor = new MobileMessageCursorChild(aRequestReply); // Add an extra ref for IPDL. Will be released in // SmsChild::DeallocPMobileMessageCursor(). RefPtr<MobileMessageCursorChild> actorCopy(actor); - mozilla::unused << actorCopy.forget().take(); + mozilla::Unused << actorCopy.forget().take(); smsChild->SendPMobileMessageCursorConstructor(actor, aRequest); actor.forget(aResult); return NS_OK; } uint32_t
--- a/dom/mobilemessage/ipc/SmsParent.cpp +++ b/dom/mobilemessage/ipc/SmsParent.cpp @@ -220,83 +220,83 @@ SmsParent::Observe(nsISupports* aSubject if (!strcmp(aTopic, kSmsReceivedObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-received' topic without a valid message!"); return NS_OK; } - unused << SendNotifyReceivedMessage(msgData); + Unused << SendNotifyReceivedMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsRetrievingObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-retrieving' topic without a valid message!"); return NS_OK; } - unused << SendNotifyRetrievingMessage(msgData); + Unused << SendNotifyRetrievingMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsSendingObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-sending' topic without a valid message!"); return NS_OK; } - unused << SendNotifySendingMessage(msgData); + Unused << SendNotifySendingMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsSentObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-sent' topic without a valid message!"); return NS_OK; } - unused << SendNotifySentMessage(msgData); + Unused << SendNotifySentMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsFailedObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-failed' topic without a valid message!"); return NS_OK; } - unused << SendNotifyFailedMessage(msgData); + Unused << SendNotifyFailedMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsDeliverySuccessObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-sending' topic without a valid message!"); return NS_OK; } - unused << SendNotifyDeliverySuccessMessage(msgData); + Unused << SendNotifyDeliverySuccessMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsDeliveryErrorObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-delivery-error' topic without a valid message!"); return NS_OK; } - unused << SendNotifyDeliveryErrorMessage(msgData); + Unused << SendNotifyDeliveryErrorMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSilentSmsReceivedObserverTopic)) { nsCOMPtr<nsIDOMMozSmsMessage> smsMsg = do_QueryInterface(aSubject); if (!smsMsg) { return NS_OK; } @@ -304,50 +304,50 @@ SmsParent::Observe(nsISupports* aSubject nsString sender; if (NS_FAILED(smsMsg->GetSender(sender)) || !mSilentNumbers.Contains(sender)) { return NS_OK; } MobileMessageData msgData = static_cast<SmsMessage*>(smsMsg.get())->GetData(); - unused << SendNotifyReceivedSilentMessage(msgData); + Unused << SendNotifyReceivedSilentMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsReadSuccessObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-read-success' topic without a valid message!"); return NS_OK; } - unused << SendNotifyReadSuccessMessage(msgData); + Unused << SendNotifyReadSuccessMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsReadErrorObserverTopic)) { MobileMessageData msgData; if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) { NS_ERROR("Got a 'sms-read-error' topic without a valid message!"); return NS_OK; } - unused << SendNotifyReadErrorMessage(msgData); + Unused << SendNotifyReadErrorMessage(msgData); return NS_OK; } if (!strcmp(aTopic, kSmsDeletedObserverTopic)) { nsCOMPtr<nsIDeletedMessageInfo> deletedInfo = do_QueryInterface(aSubject); if (!deletedInfo) { NS_ERROR("Got a 'sms-deleted' topic without a valid message!"); return NS_OK; } - unused << SendNotifyDeletedMessageInfo( + Unused << SendNotifyDeletedMessageInfo( static_cast<DeletedMessageInfo*>(deletedInfo.get())->GetData()); return NS_OK; } return NS_OK; } bool
--- a/dom/network/TCPServerSocketParent.cpp +++ b/dom/network/TCPServerSocketParent.cpp @@ -104,17 +104,17 @@ TCPServerSocketParent::SendCallbackAccep rv = socket->GetPort(&port); if (NS_FAILED(rv)) { NS_ERROR("Failed to get port from nsITCPSocketParent"); return NS_ERROR_FAILURE; } if (mNeckoParent) { if (mNeckoParent->SendPTCPSocketConstructor(socket, host, port)) { - mozilla::unused << PTCPServerSocketParent::SendCallbackAccept(socket); + mozilla::Unused << PTCPServerSocketParent::SendCallbackAccept(socket); } else { NS_ERROR("Sending data from PTCPSocketParent was failed."); }; } else { NS_ERROR("The member value for NeckoParent is wrong."); } @@ -137,17 +137,17 @@ TCPServerSocketParent::ActorDestroy(Acto mServerSocket = nullptr; } mNeckoParent = nullptr; } bool TCPServerSocketParent::RecvRequestDelete() { - mozilla::unused << Send__delete__(this); + mozilla::Unused << Send__delete__(this); return true; } void TCPServerSocketParent::OnConnect(TCPServerSocketEvent* event) { RefPtr<TCPSocket> socket = event->Socket(); socket->SetAppIdAndBrowser(GetAppId(), GetInBrowser());
--- a/dom/network/TCPSocket.cpp +++ b/dom/network/TCPSocket.cpp @@ -395,17 +395,17 @@ TCPSocket::EnsureCopying() } void TCPSocket::NotifyCopyComplete(nsresult aStatus) { mAsyncCopierActive = false; mMultiplexStream->RemoveStream(0); if (mSocketBridgeParent) { - mozilla::unused << mSocketBridgeParent->SendUpdateBufferedAmount(BufferedAmount(), + mozilla::Unused << mSocketBridgeParent->SendUpdateBufferedAmount(BufferedAmount(), mTrackingNumber); } if (NS_FAILED(aStatus)) { MaybeReportErrorAndCloseIfOpen(aStatus); return; }
--- a/dom/network/TCPSocketChild.cpp +++ b/dom/network/TCPSocketChild.cpp @@ -226,14 +226,14 @@ void TCPSocketChild::GetPort(uint16_t* aPort) { *aPort = mPort; } bool TCPSocketChild::RecvRequestDelete() { - mozilla::unused << Send__delete__(this); + mozilla::Unused << Send__delete__(this); return true; } } // namespace dom } // namespace mozilla
--- a/dom/network/TCPSocketParent.cpp +++ b/dom/network/TCPSocketParent.cpp @@ -32,17 +32,17 @@ DeserializeArrayBuffer(JSContext* aCx, } // namespace IPC namespace mozilla { namespace dom { static void FireInteralError(mozilla::net::PTCPSocketParent* aActor, uint32_t aLineNo) { - mozilla::unused << + mozilla::Unused << aActor->SendCallback(NS_LITERAL_STRING("onerror"), TCPError(NS_LITERAL_STRING("InvalidStateError"), NS_LITERAL_STRING("Internal error")), static_cast<uint32_t>(TCPReadyState::Connecting)); } NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPSocketParentBase) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_END @@ -130,17 +130,17 @@ TCPSocketParentBase::AddIPDLReference() mIPCOpen = true; this->AddRef(); } NS_IMETHODIMP_(MozExternalRefCountType) TCPSocketParent::Release(void) { nsrefcnt refcnt = TCPSocketParentBase::Release(); if (refcnt == 1 && mIPCOpen) { - mozilla::unused << PTCPSocketParent::SendRequestDelete(); + mozilla::Unused << PTCPSocketParent::SendRequestDelete(); return 1; } return refcnt; } bool TCPSocketParent::RecvOpen(const nsString& aHost, const uint16_t& aPort, const bool& aUseSSL, const bool& aUseArrayBuffers) @@ -330,17 +330,17 @@ void TCPSocketParent::FireStringDataEvent(const nsACString& aData, TCPReadyState aReadyState) { SendEvent(NS_LITERAL_STRING("data"), SendableData(nsCString(aData)), aReadyState); } void TCPSocketParent::SendEvent(const nsAString& aType, CallbackData aData, TCPReadyState aReadyState) { - mozilla::unused << PTCPSocketParent::SendCallback(nsString(aType), aData, + mozilla::Unused << PTCPSocketParent::SendCallback(nsString(aType), aData, static_cast<uint32_t>(aReadyState)); } void TCPSocketParent::SetSocket(TCPSocket *socket) { mSocket = socket; } @@ -374,14 +374,14 @@ TCPSocketParent::ActorDestroy(ActorDestr mSocket->Close(); } mSocket = nullptr; } bool TCPSocketParent::RecvRequestDelete() { - mozilla::unused << Send__delete__(this); + mozilla::Unused << Send__delete__(this); return true; } } // namespace dom } // namespace mozilla
--- a/dom/network/UDPSocketChild.cpp +++ b/dom/network/UDPSocketChild.cpp @@ -334,49 +334,49 @@ UDPSocketChild::GetFilterName(nsACString bool UDPSocketChild::RecvCallbackOpened(const UDPAddressInfo& aAddressInfo) { mLocalAddress = aAddressInfo.addr(); mLocalPort = aAddressInfo.port(); UDPSOCKET_LOG(("%s: %s:%u", __FUNCTION__, mLocalAddress.get(), mLocalPort)); nsresult rv = mSocket->CallListenerOpened(); - mozilla::unused << NS_WARN_IF(NS_FAILED(rv)); + mozilla::Unused << NS_WARN_IF(NS_FAILED(rv)); return true; } bool UDPSocketChild::RecvCallbackClosed() { nsresult rv = mSocket->CallListenerClosed(); - mozilla::unused << NS_WARN_IF(NS_FAILED(rv)); + mozilla::Unused << NS_WARN_IF(NS_FAILED(rv)); return true; } bool UDPSocketChild::RecvCallbackReceivedData(const UDPAddressInfo& aAddressInfo, InfallibleTArray<uint8_t>&& aData) { UDPSOCKET_LOG(("%s: %s:%u length %u", __FUNCTION__, aAddressInfo.addr().get(), aAddressInfo.port(), aData.Length())); nsresult rv = mSocket->CallListenerReceivedData(aAddressInfo.addr(), aAddressInfo.port(), aData.Elements(), aData.Length()); - mozilla::unused << NS_WARN_IF(NS_FAILED(rv)); + mozilla::Unused << NS_WARN_IF(NS_FAILED(rv)); return true; } bool UDPSocketChild::RecvCallbackError(const nsCString& aMessage, const nsCString& aFilename, const uint32_t& aLineNumber) { UDPSOCKET_LOG(("%s: %s:%s:%u", __FUNCTION__, aMessage.get(), aFilename.get(), aLineNumber)); nsresult rv = mSocket->CallListenerError(aMessage, aFilename, aLineNumber); - mozilla::unused << NS_WARN_IF(NS_FAILED(rv)); + mozilla::Unused << NS_WARN_IF(NS_FAILED(rv)); return true; } } // namespace dom } // namespace mozilla
--- a/dom/network/UDPSocketParent.cpp +++ b/dom/network/UDPSocketParent.cpp @@ -94,17 +94,17 @@ UDPSocketParent::GetAppId() bool UDPSocketParent::Init(const IPC::Principal& aPrincipal, const nsACString& aFilter) { MOZ_ASSERT_IF(mBackgroundManager, !aPrincipal); // will be used once we move all UDPSocket to PBackground, or // if we add in Principal checking for mtransport - unused << mBackgroundManager; + Unused << mBackgroundManager; mPrincipal = aPrincipal; if (net::UsingNeckoIPCSecurity() && mPrincipal && !ContentParent::IgnoreIPCPrincipal()) { if (mNeckoManager) { if (!AssertAppPrincipal(mNeckoManager->Manager(), mPrincipal)) { return false; @@ -180,17 +180,17 @@ UDPSocketParent::RecvBind(const UDPAddre uint16_t port; if (NS_FAILED(localAddr->GetPort(&port))) { FireInternalError(__LINE__); return true; } UDPSOCKET_LOG(("%s: SendCallbackOpened: %s:%u", __FUNCTION__, addr.get(), port)); - mozilla::unused << SendCallbackOpened(UDPAddressInfo(addr, port)); + mozilla::Unused << SendCallbackOpened(UDPAddressInfo(addr, port)); return true; } nsresult UDPSocketParent::BindInternal(const nsCString& aHost, const uint16_t& aPort, const bool& aAddressReuse, const bool& aLoopback) { @@ -381,25 +381,25 @@ UDPSocketParent::RecvClose() { if (!mSocket) { return true; } nsresult rv = mSocket->Close(); mSocket = nullptr; - mozilla::unused << NS_WARN_IF(NS_FAILED(rv)); + mozilla::Unused << NS_WARN_IF(NS_FAILED(rv)); return true; } bool UDPSocketParent::RecvRequestDelete() { - mozilla::unused << Send__delete__(this); + mozilla::Unused << Send__delete__(this); return true; } void UDPSocketParent::ActorDestroy(ActorDestroyReason why) { MOZ_ASSERT(mIPCOpen); mIPCOpen = false; @@ -454,36 +454,36 @@ UDPSocketParent::OnPacketReceived(nsIUDP if (!fallibleArray.InsertElementsAt(0, buffer, len, fallible)) { FireInternalError(__LINE__); return NS_ERROR_OUT_OF_MEMORY; } InfallibleTArray<uint8_t> infallibleArray; infallibleArray.SwapElements(fallibleArray); // compose callback - mozilla::unused << SendCallbackReceivedData(UDPAddressInfo(ip, port), infallibleArray); + mozilla::Unused << SendCallbackReceivedData(UDPAddressInfo(ip, port), infallibleArray); return NS_OK; } NS_IMETHODIMP UDPSocketParent::OnStopListening(nsIUDPSocket* aSocket, nsresult aStatus) { // underlying socket is dead, send state update to child process if (mIPCOpen) { - mozilla::unused << SendCallbackClosed(); + mozilla::Unused << SendCallbackClosed(); } return NS_OK; } void UDPSocketParent::FireInternalError(uint32_t aLineNo) { if (!mIPCOpen) { return; } - mozilla::unused << SendCallbackError(NS_LITERAL_CSTRING("Internal error"), + mozilla::Unused << SendCallbackError(NS_LITERAL_CSTRING("Internal error"), NS_LITERAL_CSTRING(__FILE__), aLineNo); } } // namespace dom } // namespace mozilla
--- a/dom/nfc/gonk/NfcMessageHandler.cpp +++ b/dom/nfc/gonk/NfcMessageHandler.cpp @@ -50,17 +50,17 @@ NfcMessageHandler::Marshall(Parcel& aPar }; return result; } bool NfcMessageHandler::Unmarshall(const Parcel& aParcel, EventOptions& aOptions) { - mozilla::unused << htonl(aParcel.readInt32()); // parcel size + mozilla::Unused << htonl(aParcel.readInt32()); // parcel size int32_t type = aParcel.readInt32(); bool isNtf = type >> 31; int32_t msgType = type & ~(1 << 31); return isNtf ? ProcessNotification(msgType, aParcel, aOptions) : ProcessResponse(msgType, aParcel, aOptions); }
--- a/dom/nfc/gonk/NfcService.cpp +++ b/dom/nfc/gonk/NfcService.cpp @@ -103,17 +103,17 @@ NfcConsumer::Start() // Store a pointer of the consumer's NFC thread for // use with |IsNfcServiceThread|. mThread = do_GetCurrentThread(); // If we could not cleanup properly before and an old // instance of the daemon is still running, we kill it // here. - unused << NS_WARN_IF(property_set("ctl.stop", "nfcd") < 0); + Unused << NS_WARN_IF(property_set("ctl.stop", "nfcd") < 0); mHandler = new NfcMessageHandler(); mStreamSocket = new StreamSocket(this, STREAM_SOCKET); mListenSocketName = BASE_SOCKET_NAME; mListenSocket = new ListenSocket(this, LISTEN_SOCKET); @@ -587,18 +587,18 @@ NfcService::Shutdown() nsresult rv = mThread->Dispatch(new ShutdownConsumerRunnable(mNfcConsumer, true), nsIEventTarget::DISPATCH_NORMAL); if (NS_FAILED(rv)) { return rv; } // |CleanupRunnable| will take care of these pointers - unused << mNfcConsumer.forget(); - unused << mThread.forget(); + Unused << mNfcConsumer.forget(); + Unused << mThread.forget(); return NS_OK; } /** * |SendRunnable| calls |NfcConsumer::Send| on the NFC thread. */ class NfcService::SendRunnable final : public nsRunnable
--- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -162,17 +162,17 @@ public: mStrings[i].mIcon, mStrings[i].mData, /* mStrings[i].mBehavior, not * supported */ mStrings[i].mServiceWorkerRegistrationID, result); n->SetStoredState(true); - unused << NS_WARN_IF(result.Failed()); + Unused << NS_WARN_IF(result.Failed()); if (!result.Failed()) { notifications.AppendElement(n.forget()); } } mPromise->MaybeResolve(notifications); return NS_OK; } @@ -214,17 +214,17 @@ public: nsCOMPtr<nsINotificationStorage> notificationStorage = do_GetService(NS_NOTIFICATION_STORAGE_CONTRACTID, &rv); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } rv = notificationStorage->Get(mOrigin, mTag, mCallback); //XXXnsm Is it guaranteed mCallback will be called in case of failure? - unused << NS_WARN_IF(NS_FAILED(rv)); + Unused << NS_WARN_IF(NS_FAILED(rv)); return rv; } }; class NotificationPermissionRequest : public nsIContentPermissionRequest, public nsIRunnable { public: @@ -1800,17 +1800,17 @@ public: mStrings[i].mIcon, mStrings[i].mData, /* mStrings[i].mBehavior, not * supported */ mStrings[i].mServiceWorkerRegistrationID, result); n->SetStoredState(true); - unused << NS_WARN_IF(result.Failed()); + Unused << NS_WARN_IF(result.Failed()); if (!result.Failed()) { notifications.AppendElement(n.forget()); } } workerPromise->MaybeResolve(notifications); mPromiseProxy->CleanUp(aCx); }
--- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -560,17 +560,17 @@ nsresult nsNPAPIPluginInstance::SetWindo NPError error; NS_TRY_SAFE_CALL_RETURN(error, (*pluginFunctions->setwindow)(&mNPP, (NPWindow*)window), this, NS_PLUGIN_CALL_UNSAFE_TO_REENTER_GECKO); // 'error' is only used if this is a logging-enabled build. // That is somewhat complex to check, so we just use "unused" // to suppress any compiler warnings in build configurations // where the logging is a no-op. - mozilla::unused << error; + mozilla::Unused << error; mInPluginInitCall = oldVal; NPP_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPP SetWindow called: this=%p, [x=%d,y=%d,w=%d,h=%d], clip[t=%d,b=%d,l=%d,r=%d], return=%d\n", this, window->x, window->y, window->width, window->height, window->clipRect.top, window->clipRect.bottom, window->clipRect.left, window->clipRect.right, error)); }
--- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -158,17 +158,17 @@ IsEnabledStateLockedForPlugin(nsIInterna { *aIsEnabledStateLocked = false; nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (NS_WARN_IF(!prefs)) { return NS_ERROR_FAILURE; } - unused << prefs->PrefIsLocked(GetStatePrefNameForPlugin(aTag).get(), + Unused << prefs->PrefIsLocked(GetStatePrefNameForPlugin(aTag).get(), aIsEnabledStateLocked); return NS_OK; } /* nsIInternalPluginTag */ nsIInternalPluginTag::nsIInternalPluginTag() {
--- a/dom/plugins/ipc/BrowserStreamParent.cpp +++ b/dom/plugins/ipc/BrowserStreamParent.cpp @@ -50,17 +50,17 @@ BrowserStreamParent::RecvAsyncNPP_NewStr { PLUGIN_LOG_DEBUG_FUNCTION; PluginAsyncSurrogate* surrogate = mNPP->GetAsyncSurrogate(); MOZ_ASSERT(surrogate); surrogate->AsyncCallArriving(); if (mState == DEFERRING_DESTROY) { // We've been asked to destroy ourselves before init was complete. mState = DYING; - unused << SendNPP_DestroyStream(mDeferredDestroyReason); + Unused << SendNPP_DestroyStream(mDeferredDestroyReason); return true; } NPError error = rv; if (error == NPERR_NO_ERROR) { if (!mStreamListener) { return false; } @@ -68,17 +68,17 @@ BrowserStreamParent::RecvAsyncNPP_NewStr mState = ALIVE; } else { error = NPERR_GENERIC_ERROR; } } if (error != NPERR_NO_ERROR) { surrogate->DestroyAsyncStream(mStream); - unused << PBrowserStreamParent::Send__delete__(this); + Unused << PBrowserStreamParent::Send__delete__(this); } return true; } bool BrowserStreamParent::AnswerNPN_RequestRead(const IPCByteRanges& ranges, NPError* result) @@ -146,17 +146,17 @@ BrowserStreamParent::NPP_DestroyStream(N NS_ASSERTION(ALIVE == mState || INITIALIZING == mState, "NPP_DestroyStream called twice?"); bool stillInitializing = INITIALIZING == mState; if (stillInitializing) { mState = DEFERRING_DESTROY; mDeferredDestroyReason = reason; } else { mState = DYING; - unused << SendNPP_DestroyStream(reason); + Unused << SendNPP_DestroyStream(reason); } } bool BrowserStreamParent::RecvStreamDestroyed() { if (DYING != mState) { NS_ERROR("Unexpected state"); @@ -208,14 +208,14 @@ BrowserStreamParent::StreamAsFile(const // Make sure our stream survives until the plugin process tells us we've // been destroyed (until RecvStreamDestroyed() is called). Since we retain // mStreamPeer at most once, we won't get in trouble if StreamAsFile() is // called more than once. if (!mStreamPeer) { nsNPAPIPlugin::RetainStream(mStream, getter_AddRefs(mStreamPeer)); } - unused << SendNPP_StreamAsFile(nsCString(fname)); + Unused << SendNPP_StreamAsFile(nsCString(fname)); return; } } // namespace plugins } // namespace mozilla
--- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -822,17 +822,17 @@ PluginInstanceParent::EndUpdateBackgroun // recomposite for "a while" until the next update. This XSync // still doesn't guarantee that the plugin draws onto a consistent // view of its background, but it does mean that the plugin is // drawing onto pixels no older than those in the latest // EndUpdateBackground(). XSync(DefaultXDisplay(), False); #endif - unused << SendUpdateBackground(BackgroundDescriptor(), aRect); + Unused << SendUpdateBackground(BackgroundDescriptor(), aRect); return NS_OK; } PluginAsyncSurrogate* PluginInstanceParent::GetAsyncSurrogate() { return mSurrogate; @@ -875,17 +875,17 @@ PluginInstanceParent::DestroyBackground( // Relinquish ownership of |mBackground| to its destroyer PPluginBackgroundDestroyerParent* pbd = new PluginBackgroundDestroyerParent(mBackground); mBackground = nullptr; // If this fails, there's no problem: |bd| will be destroyed along // with the old background surface. - unused << SendPPluginBackgroundDestroyerConstructor(pbd); + Unused << SendPPluginBackgroundDestroyerConstructor(pbd); } mozilla::plugins::SurfaceDescriptor PluginInstanceParent::BackgroundDescriptor() { MOZ_ASSERT(mBackground, "Need a background here"); // XXX refactor me @@ -1152,17 +1152,17 @@ PluginInstanceParent::NPP_SetValue(NPNVa void PluginInstanceParent::NPP_URLRedirectNotify(const char* url, int32_t status, void* notifyData) { if (!notifyData) return; PStreamNotifyParent* streamNotify = static_cast<PStreamNotifyParent*>(notifyData); - unused << streamNotify->SendRedirectNotify(NullableString(url), status); + Unused << streamNotify->SendRedirectNotify(NullableString(url), status); } int16_t PluginInstanceParent::NPP_HandleEvent(void* event) { PLUGIN_LOG_DEBUG_FUNCTION; #if defined(XP_MACOSX) @@ -1386,17 +1386,17 @@ PluginInstanceParent::NPP_NewStream(NPMI err = NPERR_GENERIC_ERROR; } } else { bs->SetAlive(); if (!CallNPP_NewStream(bs, NullableString(type), seekable, &err, stype)) { err = NPERR_GENERIC_ERROR; } if (NPERR_NO_ERROR != err) { - unused << PBrowserStreamParent::Send__delete__(bs); + Unused << PBrowserStreamParent::Send__delete__(bs); } } return err; } NPError PluginInstanceParent::NPP_DestroyStream(NPStream* stream, NPReason reason) @@ -1515,17 +1515,17 @@ void PluginInstanceParent::NPP_URLNotify(const char* url, NPReason reason, void* notifyData) { PLUGIN_LOG_DEBUG(("%s (%s, %i, %p)", FULLFUNCTION, url, (int) reason, notifyData)); PStreamNotifyParent* streamNotify = static_cast<PStreamNotifyParent*>(notifyData); - unused << PStreamNotifyParent::Send__delete__(streamNotify, reason); + Unused << PStreamNotifyParent::Send__delete__(streamNotify, reason); } bool PluginInstanceParent::RegisterNPObjectForActor( NPObject* aObject, PluginScriptableObjectParent* aActor) { NS_ASSERTION(aObject && aActor, "Null pointers!"); @@ -1804,17 +1804,17 @@ PluginInstanceParent::PluginWindowHookPr return DefWindowProc(hWnd, message, wParam, lParam); } NS_ASSERTION(self->mPluginHWND == hWnd, "Wrong window!"); switch (message) { case WM_SETFOCUS: // Let the child plugin window know it should take focus. - unused << self->CallSetPluginFocus(); + Unused << self->CallSetPluginFocus(); break; case WM_CLOSE: self->UnsubclassPluginWindow(); break; } if (self->mPluginWndProc == PluginWindowHookProc) {
--- a/dom/plugins/ipc/PluginInstanceParent.h +++ b/dom/plugins/ipc/PluginInstanceParent.h @@ -302,17 +302,17 @@ public: nsresult IsRemoteDrawingCoreAnimation(bool *aDrawing); nsresult ContentsScaleFactorChanged(double aContentsScaleFactor); #endif nsresult SetBackgroundUnknown(); nsresult BeginUpdateBackground(const nsIntRect& aRect, gfxContext** aCtx); nsresult EndUpdateBackground(gfxContext* aCtx, const nsIntRect& aRect); - void DidComposite() { unused << SendNPP_DidComposite(); } + void DidComposite() { Unused << SendNPP_DidComposite(); } virtual PluginAsyncSurrogate* GetAsyncSurrogate() override; virtual PluginInstanceParent* GetInstance() override { return this; } static PluginInstanceParent* Cast(NPP instance, PluginAsyncSurrogate** aSurrogate = nullptr);
--- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -2558,11 +2558,11 @@ PluginModuleChild::RecvGatherProfile() nsCString profileCString; UniquePtr<char[]> profile = profiler_get_profile(); if (profile != nullptr) { profileCString = nsCString(profile.get(), strlen(profile.get())); } else { profileCString = nsCString("", 0); } - unused << SendProfile(profileCString); + Unused << SendProfile(profileCString); return true; }
--- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -863,17 +863,17 @@ PluginModuleParent::TimeoutChanged(const !strcmp(aPref, kHangUITimeoutPref)) { MOZ_ASSERT(module->IsChrome()); static_cast<PluginModuleChromeParent*>(module)->EvaluateHangUIState(true); #endif // XP_WIN } else if (!strcmp(aPref, kParentTimeoutPref)) { // The timeout value used by the child for its parent MOZ_ASSERT(module->IsChrome()); int32_t timeoutSecs = Preferences::GetInt(kParentTimeoutPref, 0); - unused << static_cast<PluginModuleChromeParent*>(module)->SendSetParentHangTimeout(timeoutSecs); + Unused << static_cast<PluginModuleChromeParent*>(module)->SendSetParentHangTimeout(timeoutSecs); } else if (!strcmp(aPref, kContentTimeoutPref)) { MOZ_ASSERT(!module->IsChrome()); int32_t timeoutSecs = Preferences::GetInt(kContentTimeoutPref, 0); module->SetChildTimeout(timeoutSecs); } } void @@ -1697,17 +1697,17 @@ PluginModuleParent::SetPluginFuncs(NPPlu aFuncs->setvalue = NPP_SetValue; aFuncs->gotfocus = nullptr; aFuncs->lostfocus = nullptr; aFuncs->urlredirectnotify = nullptr; // Provide 'NPP_URLRedirectNotify', 'NPP_ClearSiteData', and // 'NPP_GetSitesWithData' functionality if it is supported by the plugin. bool urlRedirectSupported = false; - unused << CallOptionalFunctionsSupported(&urlRedirectSupported, + Unused << CallOptionalFunctionsSupported(&urlRedirectSupported, &mClearSiteDataSupported, &mGetSitesWithDataSupported); if (urlRedirectSupported) { aFuncs->urlredirectnotify = NPP_URLRedirectNotify; } } #define RESOLVE_AND_CALL(instance, func) \ @@ -1742,17 +1742,17 @@ PluginModuleParent::NPP_Destroy(NPP inst } if (!parentInstance) return NPERR_NO_ERROR; NPError retval = parentInstance->Destroy(); instance->pdata = nullptr; - unused << PluginInstanceParent::Call__delete__(parentInstance); + Unused << PluginInstanceParent::Call__delete__(parentInstance); return retval; } NPError PluginModuleParent::NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) { @@ -2085,17 +2085,17 @@ PluginModuleParent::GetSettings(PluginSe #endif } void PluginModuleChromeParent::CachedSettingChanged() { PluginSettings settings; GetSettings(&settings); - unused << SendSettingChanged(settings); + Unused << SendSettingChanged(settings); } /* static */ void PluginModuleChromeParent::CachedSettingChanged(const char* aPref, void* aModule) { PluginModuleChromeParent *module = static_cast<PluginModuleChromeParent*>(aModule); module->CachedSettingChanged(); } @@ -2338,17 +2338,17 @@ PluginModuleChromeParent::RecvNP_Initial // Send the info needed to join the chrome process's audio session to the // plugin process nsID id; nsString sessionName; nsString iconPath; if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName, iconPath))) { - unused << SendSetAudioSessionData(id, sessionName, iconPath); + Unused << SendSetAudioSessionData(id, sessionName, iconPath); } #endif #ifdef MOZ_CRASHREPORTER_INJECTOR InitializeInjector(); #endif } @@ -2806,17 +2806,17 @@ PluginModuleParent::RecvProcessNativeEve return false; #endif } void PluginModuleParent::ProcessRemoteNativeEventsInInterruptCall() { #if defined(OS_WIN) - unused << SendProcessNativeEventsInInterruptCall(); + Unused << SendProcessNativeEventsInInterruptCall(); return; #endif NS_NOTREACHED( "PluginModuleParent::ProcessRemoteNativeEventsInInterruptCall not implemented!"); } bool PluginModuleParent::RecvPluginShowWindow(const uint32_t& aWindowId, const bool& aModal, @@ -3145,19 +3145,19 @@ PluginProfilerObserver::Observe(nsISuppo if (!strcmp(aTopic, "profiler-started")) { nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject)); uint32_t entries; double interval; params->GetEntries(&entries); params->GetInterval(&interval); const nsTArray<nsCString>& features = params->GetFeatures(); const nsTArray<nsCString>& threadFilterNames = params->GetThreadFilterNames(); - unused << mPmp->SendStartProfiler(entries, interval, features, threadFilterNames); + Unused << mPmp->SendStartProfiler(entries, interval, features, threadFilterNames); } else if (!strcmp(aTopic, "profiler-stopped")) { - unused << mPmp->SendStopProfiler(); + Unused << mPmp->SendStopProfiler(); } else if (!strcmp(aTopic, "profiler-subprocess-gather")) { RefPtr<ProfileGatherer> gatherer = static_cast<ProfileGatherer*>(aSubject); mPmp->GatherAsyncProfile(gatherer); } else if (!strcmp(aTopic, "profiler-subprocess")) { nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject); mPmp->GatheredAsyncProfile(pse); } return NS_OK; @@ -3188,17 +3188,17 @@ PluginModuleChromeParent::ShutdownPlugin } } void PluginModuleChromeParent::GatherAsyncProfile(ProfileGatherer* aGatherer) { mGatherer = aGatherer; mGatherer->WillGatherOOPProfile(); - unused << SendGatherProfile(); + Unused << SendGatherProfile(); } void PluginModuleChromeParent::GatheredAsyncProfile(nsIProfileSaveEvent* aSaveEvent) { if (aSaveEvent && !mProfile.IsEmpty()) { aSaveEvent->AddSubProfile(mProfile.get()); mProfile.Truncate();
--- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp @@ -719,17 +719,17 @@ PluginScriptableObjectParent::Protect() void PluginScriptableObjectParent::Unprotect() { NS_ASSERTION(mObject, "No object!"); NS_ASSERTION(mProtectCount >= 0, "Negative protect count?!"); if (mType == LocalObject) { if (--mProtectCount == 0) { - unused << PluginScriptableObjectParent::Send__delete__(this); + Unused << PluginScriptableObjectParent::Send__delete__(this); } } } void PluginScriptableObjectParent::DropNPObject() { NS_ASSERTION(mObject, "Invalidated object!"); @@ -739,17 +739,17 @@ PluginScriptableObjectParent::DropNPObje // We think we're about to be deleted, but we could be racing with the other // process. PluginInstanceParent* instance = GetInstance(); NS_ASSERTION(instance, "Must have an instance!"); instance->UnregisterNPObject(mObject); mObject = nullptr; - unused << SendUnprotect(); + Unused << SendUnprotect(); } void PluginScriptableObjectParent::ActorDestroy(ActorDestroyReason aWhy) { // Implement me! Bug 1005163 }
--- a/dom/plugins/ipc/PluginWidgetChild.cpp +++ b/dom/plugins/ipc/PluginWidgetChild.cpp @@ -36,17 +36,17 @@ PluginWidgetChild::~PluginWidgetChild() void PluginWidgetChild::ProxyShutdown() { PWLOG("PluginWidgetChild::ProxyShutdown()\n"); if (mWidget) { mWidget = nullptr; auto tab = static_cast<mozilla::dom::TabChild*>(Manager()); if (!tab->IsDestroyed()) { - unused << Send__delete__(this); + Unused << Send__delete__(this); } } } void PluginWidgetChild::KillWidget() { PWLOG("PluginWidgetChild::KillWidget()\n");
--- a/dom/presentation/provider/MulticastDNSDeviceProvider.cpp +++ b/dom/presentation/provider/MulticastDNSDeviceProvider.cpp @@ -52,17 +52,17 @@ namespace { #ifdef MOZ_WIDGET_ANDROID static void GetAndroidDeviceName(nsACString& aRetVal) { nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1"); MOZ_ASSERT(infoService, "Could not find a system info service"); - unused << NS_WARN_IF(NS_FAILED(infoService->GetPropertyAsACString( + Unused << NS_WARN_IF(NS_FAILED(infoService->GetPropertyAsACString( NS_LITERAL_STRING("device"), aRetVal))); } #endif // MOZ_WIDGET_ANDROID class TCPDeviceInfo final : public nsITCPDeviceInfo { public: NS_DECL_ISUPPORTS @@ -201,21 +201,21 @@ MulticastDNSDeviceProvider::Init() mDiscveryTimeoutMs = Preferences::GetUint(PREF_PRESENTATION_DISCOVERY_TIMEOUT_MS); mDiscoverable = Preferences::GetBool(PREF_PRESENTATION_DISCOVERABLE); mServiceName = Preferences::GetCString(PREF_PRESENTATION_DEVICE_NAME); #ifdef MOZ_WIDGET_ANDROID // FIXME: Bug 1185806 - Provide a common device name setting. if (mServiceName.IsEmpty()) { GetAndroidDeviceName(mServiceName); - unused << Preferences::SetCString(PREF_PRESENTATION_DEVICE_NAME, mServiceName); + Unused << Preferences::SetCString(PREF_PRESENTATION_DEVICE_NAME, mServiceName); } #endif // MOZ_WIDGET_ANDROID - unused << mPresentationServer->SetId(mServiceName); + Unused << mPresentationServer->SetId(mServiceName); if (mDiscoveryEnabled && NS_WARN_IF(NS_FAILED(rv = ForceDiscovery()))) { return rv; } if (mDiscoverable && NS_WARN_IF(NS_FAILED(rv = RegisterService()))) { return rv; } @@ -320,17 +320,17 @@ MulticastDNSDeviceProvider::UnregisterSe nsresult MulticastDNSDeviceProvider::StopDiscovery(nsresult aReason) { LOG_I("StopDiscovery (0x%08x)", aReason); MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(mDiscoveryTimer); - unused << mDiscoveryTimer->Cancel(); + Unused << mDiscoveryTimer->Cancel(); if (mDiscoveryRequest) { mDiscoveryRequest->Cancel(aReason); mDiscoveryRequest = nullptr; } return NS_OK; } @@ -366,17 +366,17 @@ MulticastDNSDeviceProvider::AddDevice(co aServiceType, aAddress, aPort, DeviceState::eActive, this); nsCOMPtr<nsIPresentationDeviceListener> listener; if (NS_SUCCEEDED(GetListener(getter_AddRefs(listener))) && listener) { - unused << listener->AddDevice(device); + Unused << listener->AddDevice(device); } mDevices.AppendElement(device); return NS_OK; } nsresult @@ -394,17 +394,17 @@ MulticastDNSDeviceProvider::UpdateDevice } RefPtr<Device> device = mDevices[aIndex]; device->Update(aServiceName, aServiceType, aAddress, aPort); device->ChangeState(DeviceState::eActive); nsCOMPtr<nsIPresentationDeviceListener> listener; if (NS_SUCCEEDED(GetListener(getter_AddRefs(listener))) && listener) { - unused << listener->UpdateDevice(device); + Unused << listener->UpdateDevice(device); } return NS_OK; } nsresult MulticastDNSDeviceProvider::RemoveDevice(const uint32_t aIndex) { @@ -417,17 +417,17 @@ MulticastDNSDeviceProvider::RemoveDevice RefPtr<Device> device = mDevices[aIndex]; LOG_I("RemoveDevice: %s", device->Id().get()); mDevices.RemoveElementAt(aIndex); nsCOMPtr<nsIPresentationDeviceListener> listener; if (NS_SUCCEEDED(GetListener(getter_AddRefs(listener))) && listener) { - unused << listener->RemoveDevice(device); + Unused << listener->RemoveDevice(device); } return NS_OK; } bool MulticastDNSDeviceProvider::FindDeviceById(const nsACString& aId, uint32_t& aIndex) @@ -563,17 +563,17 @@ MulticastDNSDeviceProvider::ForceDiscove return NS_OK; } MOZ_ASSERT(mDiscoveryTimer); MOZ_ASSERT(mMulticastDNS); // if it's already discovering, extend existing discovery timeout. if (mIsDiscovering) { - unused << mDiscoveryTimer->Cancel(); + Unused << mDiscoveryTimer->Cancel(); NS_WARN_IF(NS_FAILED(mDiscoveryTimer->Init(this, mDiscveryTimeoutMs, nsITimer::TYPE_ONE_SHOT))); return NS_OK; } StopDiscovery(NS_OK); @@ -875,45 +875,45 @@ NS_IMETHODIMP MulticastDNSDeviceProvider::OnSessionRequest(nsITCPDeviceInfo* aDeviceInfo, const nsAString& aUrl, const nsAString& aPresentationId, nsIPresentationControlChannel* aControlChannel) { MOZ_ASSERT(NS_IsMainThread()); nsAutoCString address; - unused << aDeviceInfo->GetAddress(address); + Unused << aDeviceInfo->GetAddress(address); LOG_I("OnSessionRequest: %s", address.get()); RefPtr<Device> device; uint32_t index; if (FindDeviceByAddress(address, index)) { device = mDevices[index]; } else { // create a one-time device object for non-discoverable controller // this device will not be listed in available device list and cannot // be used for requesting session. nsAutoCString id; - unused << aDeviceInfo->GetId(id); + Unused << aDeviceInfo->GetId(id); uint16_t port; - unused << aDeviceInfo->GetPort(&port); + Unused << aDeviceInfo->GetPort(&port); device = new Device(id, /* aName = */ id, /* aType = */ EmptyCString(), address, port, DeviceState::eActive, /* aProvider = */ nullptr); } nsCOMPtr<nsIPresentationDeviceListener> listener; if (NS_SUCCEEDED(GetListener(getter_AddRefs(listener))) && listener) { - unused << listener->OnSessionRequest(device, aUrl, aPresentationId, + Unused << listener->OnSessionRequest(device, aUrl, aPresentationId, aControlChannel); } return NS_OK; } // nsIObserver NS_IMETHODIMP
--- a/dom/speakermanager/SpeakerManagerService.cpp +++ b/dom/speakermanager/SpeakerManagerService.cpp @@ -128,17 +128,17 @@ SpeakerManagerService::GetSpeakerStatus( void SpeakerManagerService::Notify() { // Parent Notify to all the child processes. nsTArray<ContentParent*> children; ContentParent::GetAll(children); for (uint32_t i = 0; i < children.Length(); i++) { - unused << children[i]->SendSpeakerManagerNotify(); + Unused << children[i]->SendSpeakerManagerNotify(); } for (uint32_t i = 0; i < mRegisteredSpeakerManagers.Length(); i++) { mRegisteredSpeakerManagers[i]-> DispatchSimpleEvent(NS_LITERAL_STRING("speakerforcedchange")); } }
--- a/dom/storage/DOMStorageCache.cpp +++ b/dom/storage/DOMStorageCache.cpp @@ -528,17 +528,17 @@ DOMStorageCache::RemoveItem(const DOMSto if (!data.mKeys.Get(aKey, &aOld)) { SetDOMStringToNull(aOld); return NS_SUCCESS_DOM_NO_OPERATION; } // Recalculate the cached data size const int64_t delta = -(static_cast<int64_t>(aOld.Length()) + static_cast<int64_t>(aKey.Length())); - unused << ProcessUsageDelta(aStorage, delta); + Unused << ProcessUsageDelta(aStorage, delta); data.mKeys.Remove(aKey); if (Persist(aStorage)) { if (!sDatabase) { NS_ERROR("Writing to localStorage after the database has been shut down" ", data lose!"); return NS_ERROR_NOT_INITIALIZED; } @@ -567,17 +567,17 @@ DOMStorageCache::Clear(const DOMStorage* mLoadResult = NS_OK; } } Data& data = DataSet(aStorage); bool hadData = !!data.mKeys.Count(); if (hadData) { - unused << ProcessUsageDelta(aStorage, -data.mOriginQuotaUsage); + Unused << ProcessUsageDelta(aStorage, -data.mOriginQuotaUsage); data.mKeys.Clear(); } if (Persist(aStorage) && (refresh || hadData)) { if (!sDatabase) { NS_ERROR("Writing to localStorage after the database has been shut down" ", data lose!"); return NS_ERROR_NOT_INITIALIZED;