mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros See: https://reviews.llvm.org/D33440 This is why the diff is bigger than usual # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D26098 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
45ec6114d3
commit
03c8e8c2dd
@ -5,15 +5,15 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
MARKUPMAP(a,
|
||||
MARKUPMAP(
|
||||
a,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// Only some roles truly enjoy life as HTMLLinkAccessibles, for
|
||||
// details see closed bug 494807.
|
||||
const nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aElement);
|
||||
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
|
||||
roleMapEntry->role != roles::LINK) {
|
||||
return new HyperTextAccessibleWrap(aElement,
|
||||
aContext->Document());
|
||||
return new HyperTextAccessibleWrap(aElement, aContext->Document());
|
||||
}
|
||||
|
||||
return new HTMLLinkAccessible(aElement, aContext->Document());
|
||||
@ -30,21 +30,22 @@ MARKUPMAP(aside, New_HyperText, roles::LANDMARK)
|
||||
|
||||
MARKUPMAP(blockquote, New_HyperText, roles::BLOCKQUOTE)
|
||||
|
||||
MARKUPMAP(button,
|
||||
MARKUPMAP(
|
||||
button,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLButtonAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(caption,
|
||||
MARKUPMAP(
|
||||
caption,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
if (aContext->IsTable()) {
|
||||
dom::HTMLTableElement* tableEl =
|
||||
dom::HTMLTableElement::FromNode(aContext->GetContent());
|
||||
if (tableEl && tableEl == aElement->GetParent() &&
|
||||
tableEl->GetCaption() == aElement) {
|
||||
return new HTMLCaptionAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLCaptionAccessible(aElement, aContext->Document());
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
@ -120,7 +121,8 @@ MARKUPMAP(
|
||||
},
|
||||
roles::SECTION)
|
||||
|
||||
MARKUPMAP(dl,
|
||||
MARKUPMAP(
|
||||
dl,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLListAccessible(aElement, aContext->Document());
|
||||
},
|
||||
@ -128,41 +130,45 @@ MARKUPMAP(dl,
|
||||
|
||||
MARKUPMAP(dt, New_HTMLDtOrDd<HTMLLIAccessible>, roles::TERM)
|
||||
|
||||
MARKUPMAP(figcaption,
|
||||
MARKUPMAP(
|
||||
figcaption,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLFigcaptionAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::CAPTION)
|
||||
|
||||
MARKUPMAP(figure,
|
||||
MARKUPMAP(
|
||||
figure,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLFigureAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::FIGURE, Attr(xmlroles, figure))
|
||||
|
||||
MARKUPMAP(fieldset,
|
||||
MARKUPMAP(
|
||||
fieldset,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLGroupboxAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(form,
|
||||
MARKUPMAP(
|
||||
form,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLFormAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(footer,
|
||||
MARKUPMAP(
|
||||
footer,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLHeaderOrFooterAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLHeaderOrFooterAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(header,
|
||||
MARKUPMAP(
|
||||
header,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLHeaderOrFooterAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLHeaderOrFooterAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
@ -178,13 +184,15 @@ MARKUPMAP(h5, New_HyperText, roles::HEADING)
|
||||
|
||||
MARKUPMAP(h6, New_HyperText, roles::HEADING)
|
||||
|
||||
MARKUPMAP(hr,
|
||||
MARKUPMAP(
|
||||
hr,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLHRAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(input,
|
||||
MARKUPMAP(
|
||||
input,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// TODO(emilio): This would be faster if it used
|
||||
// HTMLInputElement's already-parsed representation.
|
||||
@ -198,18 +206,17 @@ MARKUPMAP(input,
|
||||
}
|
||||
if (aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::radio, eIgnoreCase)) {
|
||||
return new HTMLRadioButtonAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLRadioButtonAccessible(aElement, aContext->Document());
|
||||
}
|
||||
if (aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::time, eIgnoreCase)) {
|
||||
return new EnumRoleAccessible<roles::GROUPING>(
|
||||
aElement, aContext->Document());
|
||||
return new EnumRoleAccessible<roles::GROUPING>(aElement,
|
||||
aContext->Document());
|
||||
}
|
||||
if (aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::date, eIgnoreCase)) {
|
||||
return new EnumRoleAccessible<roles::DATE_EDITOR>(
|
||||
aElement, aContext->Document());
|
||||
return new EnumRoleAccessible<roles::DATE_EDITOR>(aElement,
|
||||
aContext->Document());
|
||||
}
|
||||
return nullptr;
|
||||
},
|
||||
@ -217,19 +224,22 @@ MARKUPMAP(input,
|
||||
|
||||
MARKUPMAP(ins, New_HyperText, roles::CONTENT_INSERTION)
|
||||
|
||||
MARKUPMAP(label,
|
||||
MARKUPMAP(
|
||||
label,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLLabelAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::LABEL)
|
||||
|
||||
MARKUPMAP(legend,
|
||||
MARKUPMAP(
|
||||
legend,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLLegendAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::LABEL)
|
||||
|
||||
MARKUPMAP(li,
|
||||
MARKUPMAP(
|
||||
li,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// If list item is a child of accessible list then create an
|
||||
// accessible for it unconditionally by tag name. nsBlockFrame
|
||||
@ -301,27 +311,30 @@ MARKUPMAP(munderover_, New_HyperText, roles::MATHML_UNDER_OVER,
|
||||
|
||||
MARKUPMAP(mmultiscripts_, New_HyperText, roles::MATHML_MULTISCRIPTS)
|
||||
|
||||
MARKUPMAP(mtable_,
|
||||
MARKUPMAP(
|
||||
mtable_,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLTableAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::MATHML_TABLE, AttrFromDOM(align, align),
|
||||
AttrFromDOM(columnlines_, columnlines_),
|
||||
AttrFromDOM(rowlines_, rowlines_))
|
||||
AttrFromDOM(columnlines_, columnlines_), AttrFromDOM(rowlines_, rowlines_))
|
||||
|
||||
MARKUPMAP(mlabeledtr_,
|
||||
MARKUPMAP(
|
||||
mlabeledtr_,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLTableRowAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::MATHML_LABELED_ROW)
|
||||
|
||||
MARKUPMAP(mtr_,
|
||||
MARKUPMAP(
|
||||
mtr_,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLTableRowAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::MATHML_TABLE_ROW)
|
||||
|
||||
MARKUPMAP(mtd_,
|
||||
MARKUPMAP(
|
||||
mtd_,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLTableCellAccessible(aElement, aContext->Document());
|
||||
},
|
||||
@ -356,27 +369,29 @@ MARKUPMAP(msline_, New_HyperText, roles::MATHML_STACK_LINE,
|
||||
|
||||
MARKUPMAP(nav, New_HyperText, roles::LANDMARK)
|
||||
|
||||
MARKUPMAP(ol,
|
||||
MARKUPMAP(
|
||||
ol,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLListAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::LIST)
|
||||
|
||||
MARKUPMAP(option,
|
||||
MARKUPMAP(
|
||||
option,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLSelectOptionAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLSelectOptionAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(optgroup,
|
||||
MARKUPMAP(
|
||||
optgroup,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLSelectOptGroupAccessible(aElement,
|
||||
aContext->Document());
|
||||
return new HTMLSelectOptGroupAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(output,
|
||||
MARKUPMAP(
|
||||
output,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLOutputAccessible(aElement, aContext->Document());
|
||||
},
|
||||
@ -384,7 +399,8 @@ MARKUPMAP(output,
|
||||
|
||||
MARKUPMAP(p, nullptr, roles::PARAGRAPH)
|
||||
|
||||
MARKUPMAP(progress,
|
||||
MARKUPMAP(
|
||||
progress,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLProgressAccessible(aElement, aContext->Document());
|
||||
},
|
||||
@ -392,23 +408,25 @@ MARKUPMAP(progress,
|
||||
|
||||
MARKUPMAP(q, New_HyperText, 0)
|
||||
|
||||
MARKUPMAP(section,
|
||||
MARKUPMAP(
|
||||
section,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLSectionAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(summary,
|
||||
MARKUPMAP(
|
||||
summary,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLSummaryAccessible(aElement, aContext->Document());
|
||||
},
|
||||
roles::SUMMARY)
|
||||
|
||||
MARKUPMAP(table,
|
||||
MARKUPMAP(
|
||||
table,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
if (aElement->GetPrimaryFrame() &&
|
||||
aElement->GetPrimaryFrame()->AccessibleType() !=
|
||||
eHTMLTableType) {
|
||||
aElement->GetPrimaryFrame()->AccessibleType() != eHTMLTableType) {
|
||||
return new ARIAGridAccessibleWrap(aElement, aContext->Document());
|
||||
}
|
||||
return nullptr;
|
||||
@ -418,7 +436,8 @@ MARKUPMAP(table,
|
||||
MARKUPMAP(time, New_HyperText, 0, Attr(xmlroles, time),
|
||||
AttrFromDOM(datetime, datetime))
|
||||
|
||||
MARKUPMAP(tbody,
|
||||
MARKUPMAP(
|
||||
tbody,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// Expose this as a grouping if its frame type is non-standard.
|
||||
if (aElement->GetPrimaryFrame() &&
|
||||
@ -429,7 +448,8 @@ MARKUPMAP(tbody,
|
||||
},
|
||||
roles::GROUPING)
|
||||
|
||||
MARKUPMAP(td,
|
||||
MARKUPMAP(
|
||||
td,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
if (aContext->IsTableRow() &&
|
||||
aContext->GetContent() == aElement->GetParent()) {
|
||||
@ -442,19 +462,19 @@ MARKUPMAP(td,
|
||||
(aElement->GetPrimaryFrame() &&
|
||||
aElement->GetPrimaryFrame()->AccessibleType() !=
|
||||
eHTMLTableCellType)) {
|
||||
return new ARIAGridCellAccessibleWrap(aElement,
|
||||
aContext->Document());
|
||||
return new ARIAGridCellAccessibleWrap(aElement, aContext->Document());
|
||||
}
|
||||
if (aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::scope)) {
|
||||
return new HTMLTableHeaderCellAccessibleWrap(
|
||||
aElement, aContext->Document());
|
||||
return new HTMLTableHeaderCellAccessibleWrap(aElement,
|
||||
aContext->Document());
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(tfoot,
|
||||
MARKUPMAP(
|
||||
tfoot,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// Expose this as a grouping if its frame type is non-standard.
|
||||
if (aElement->GetPrimaryFrame() &&
|
||||
@ -465,22 +485,23 @@ MARKUPMAP(tfoot,
|
||||
},
|
||||
roles::GROUPING)
|
||||
|
||||
MARKUPMAP(th,
|
||||
MARKUPMAP(
|
||||
th,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
if (aContext->IsTableRow() &&
|
||||
aContext->GetContent() == aElement->GetParent()) {
|
||||
if (!aContext->IsHTMLTableRow()) {
|
||||
return new ARIAGridCellAccessibleWrap(aElement,
|
||||
aContext->Document());
|
||||
return new ARIAGridCellAccessibleWrap(aElement, aContext->Document());
|
||||
}
|
||||
return new HTMLTableHeaderCellAccessibleWrap(
|
||||
aElement, aContext->Document());
|
||||
return new HTMLTableHeaderCellAccessibleWrap(aElement,
|
||||
aContext->Document());
|
||||
}
|
||||
return nullptr;
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(tfoot,
|
||||
MARKUPMAP(
|
||||
tfoot,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// Expose this as a grouping if its frame type is non-standard.
|
||||
if (aElement->GetPrimaryFrame() &&
|
||||
@ -491,7 +512,8 @@ MARKUPMAP(tfoot,
|
||||
},
|
||||
roles::GROUPING)
|
||||
|
||||
MARKUPMAP(tr,
|
||||
MARKUPMAP(
|
||||
tr,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
// If HTML:tr element is part of its HTML:table, which has CSS
|
||||
// display style other than 'table', then create a generic table row
|
||||
@ -521,7 +543,8 @@ MARKUPMAP(tr,
|
||||
},
|
||||
0)
|
||||
|
||||
MARKUPMAP(ul,
|
||||
MARKUPMAP(
|
||||
ul,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLListAccessible(aElement, aContext->Document());
|
||||
},
|
||||
|
@ -197,8 +197,7 @@ void AnonymousContent::GetComputedStylePropertyValue(
|
||||
aRv = cs->GetPropertyValue(aPropertyName, aResult);
|
||||
}
|
||||
|
||||
void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult)
|
||||
{
|
||||
void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult) {
|
||||
nsCOMPtr<Element> el = do_QueryInterface(aEvent.GetOriginalTarget());
|
||||
if (el && el->IsInNativeAnonymousSubtree() && mContentNode->Contains(el)) {
|
||||
aResult.SetKnownLiveAtom(el->GetID(), DOMString::eTreatNullAsNull);
|
||||
|
@ -143,7 +143,8 @@ RefPtr<PerformanceInfoPromise> DocGroup::ReportPerformanceInfo() {
|
||||
RefPtr<DocGroup> self = this;
|
||||
|
||||
return CollectMemoryInfo(top, mainThread)
|
||||
->Then(mainThread, __func__,
|
||||
->Then(
|
||||
mainThread, __func__,
|
||||
[self, host, pid, windowID, duration, isTopLevel,
|
||||
items](const PerformanceMemoryInfo& aMemoryInfo) {
|
||||
PerformanceInfo info =
|
||||
|
@ -47,8 +47,7 @@ size_t TreeOrderedArray<Node>::Insert(Node& aNode) {
|
||||
};
|
||||
|
||||
size_t idx;
|
||||
BinarySearchIf(mList, 0, mList.Length(),
|
||||
PositionComparator(aNode), &idx);
|
||||
BinarySearchIf(mList, 0, mList.Length(), PositionComparator(aNode), &idx);
|
||||
mList.InsertElementAt(idx, &aNode);
|
||||
return idx;
|
||||
}
|
||||
|
@ -51,8 +51,7 @@ void OnPrefChange(const char* aPrefName, void*) {
|
||||
void UIDirectionManager::Initialize() {
|
||||
DebugOnly<nsresult> rv =
|
||||
Preferences::RegisterCallback(OnPrefChange, "intl.uidirection");
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"Failed to observe \"intl.uidirection\"");
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "Failed to observe \"intl.uidirection\"");
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -1646,7 +1646,9 @@ MiscContainer* nsAttrValue::ClearMiscContainer() {
|
||||
delete cont->mValue.mIntMargin;
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ResetMiscAtomOrString();
|
||||
|
@ -243,7 +243,9 @@ inline void nsAttrValue::ToString(mozilla::dom::DOMString& aResult) const {
|
||||
aResult.SetKnownLiveAtom(atom, mozilla::dom::DOMString::eNullNotExpected);
|
||||
break;
|
||||
}
|
||||
default: { ToString(aResult.AsAString()); }
|
||||
default: {
|
||||
ToString(aResult.AsAString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,9 @@ nsresult nsCCUncollectableMarker::Observe(nsISupports* aSubject,
|
||||
xpc_UnmarkSkippableJSHolders();
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
4
dom/cache/Context.cpp
vendored
4
dom/cache/Context.cpp
vendored
@ -437,7 +437,9 @@ Context::QuotaInitRunnable::Run() {
|
||||
}
|
||||
// -----
|
||||
case STATE_WAIT_FOR_DIRECTORY_LOCK:
|
||||
default: { MOZ_CRASH("unexpected state in QuotaInitRunnable"); }
|
||||
default: {
|
||||
MOZ_CRASH("unexpected state in QuotaInitRunnable");
|
||||
}
|
||||
}
|
||||
|
||||
if (resolver->Resolved()) {
|
||||
|
@ -402,8 +402,8 @@ void WebGLContext::VertexAttribAnyPointer(bool isFuncInt, GLuint index,
|
||||
}
|
||||
|
||||
WebGLVertexAttribData& vd = mBoundVertexArray->mAttribs[index];
|
||||
vd.VertexAttribPointer(isFuncInt, buffer, AutoAssertCast(size), type, normalized, stride,
|
||||
byteOffset);
|
||||
vd.VertexAttribPointer(isFuncInt, buffer, AutoAssertCast(size), type,
|
||||
normalized, stride, byteOffset);
|
||||
mBoundVertexArray->InvalidateCaches();
|
||||
}
|
||||
|
||||
|
@ -974,7 +974,8 @@ pack<WebGLTexelFormat::RGB565, WebGLTexelPremultiplicationOp::Premultiply,
|
||||
uint8_t srcR = static_cast<uint8_t>(src[0] * scaleFactor);
|
||||
uint8_t srcG = static_cast<uint8_t>(src[1] * scaleFactor);
|
||||
uint8_t srcB = static_cast<uint8_t>(src[2] * scaleFactor);
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xFC) << 3) | ((srcB & 0xF8) >> 3));
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xFC) << 3) |
|
||||
((srcB & 0xF8) >> 3));
|
||||
}
|
||||
|
||||
// FIXME: this routine is lossy and must be removed.
|
||||
@ -987,7 +988,8 @@ pack<WebGLTexelFormat::RGB565, WebGLTexelPremultiplicationOp::Unpremultiply,
|
||||
uint8_t srcR = static_cast<uint8_t>(src[0] * scaleFactor);
|
||||
uint8_t srcG = static_cast<uint8_t>(src[1] * scaleFactor);
|
||||
uint8_t srcB = static_cast<uint8_t>(src[2] * scaleFactor);
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xFC) << 3) | ((srcB & 0xF8) >> 3));
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xFC) << 3) |
|
||||
((srcB & 0xF8) >> 3));
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -1121,8 +1123,8 @@ template <>
|
||||
MOZ_ALWAYS_INLINE void
|
||||
pack<WebGLTexelFormat::RGBA4444, WebGLTexelPremultiplicationOp::None, uint8_t,
|
||||
uint16_t>(const uint8_t* __restrict src, uint16_t* __restrict dst) {
|
||||
*dst = uint16_t(((src[0] & 0xF0) << 8) | ((src[1] & 0xF0) << 4) | (src[2] & 0xF0) |
|
||||
(src[3] >> 4));
|
||||
*dst = uint16_t(((src[0] & 0xF0) << 8) | ((src[1] & 0xF0) << 4) |
|
||||
(src[2] & 0xF0) | (src[3] >> 4));
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -1169,8 +1171,8 @@ pack<WebGLTexelFormat::RGBA5551, WebGLTexelPremultiplicationOp::Premultiply,
|
||||
uint8_t srcR = static_cast<uint8_t>(src[0] * scaleFactor);
|
||||
uint8_t srcG = static_cast<uint8_t>(src[1] * scaleFactor);
|
||||
uint8_t srcB = static_cast<uint8_t>(src[2] * scaleFactor);
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xF8) << 3) | ((srcB & 0xF8) >> 2) |
|
||||
(src[3] >> 7));
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xF8) << 3) |
|
||||
((srcB & 0xF8) >> 2) | (src[3] >> 7));
|
||||
}
|
||||
|
||||
// FIXME: this routine is lossy and must be removed.
|
||||
@ -1183,8 +1185,8 @@ pack<WebGLTexelFormat::RGBA5551, WebGLTexelPremultiplicationOp::Unpremultiply,
|
||||
uint8_t srcR = static_cast<uint8_t>(src[0] * scaleFactor);
|
||||
uint8_t srcG = static_cast<uint8_t>(src[1] * scaleFactor);
|
||||
uint8_t srcB = static_cast<uint8_t>(src[2] * scaleFactor);
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xF8) << 3) | ((srcB & 0xF8) >> 2) |
|
||||
(src[3] >> 7));
|
||||
*dst = uint16_t(((srcR & 0xF8) << 8) | ((srcG & 0xF8) << 3) |
|
||||
((srcB & 0xF8) >> 2) | (src[3] >> 7));
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -270,7 +270,8 @@ class WebGLTexture final : public nsWrapperCache,
|
||||
case LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
|
||||
case LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
|
||||
case LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
|
||||
return AutoAssertCast(rawTexImageTarget - LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_X);
|
||||
return AutoAssertCast(rawTexImageTarget -
|
||||
LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_X);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
|
@ -60,14 +60,14 @@ inline void* calloc(const ForbidNarrowing<size_t> n,
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<typename From>
|
||||
template <typename From>
|
||||
class AutoAssertCastT final {
|
||||
const From mVal;
|
||||
|
||||
public:
|
||||
explicit AutoAssertCastT(const From val) : mVal(val) { }
|
||||
public:
|
||||
explicit AutoAssertCastT(const From val) : mVal(val) {}
|
||||
|
||||
template<typename To>
|
||||
template <typename To>
|
||||
operator To() const {
|
||||
return AssertedCast<To>(mVal);
|
||||
}
|
||||
@ -75,7 +75,7 @@ public:
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<typename From>
|
||||
template <typename From>
|
||||
inline auto AutoAssertCast(const From val) {
|
||||
return detail::AutoAssertCastT<From>(val);
|
||||
}
|
||||
|
@ -150,12 +150,13 @@ already_AddRefed<Promise> Client::Focus(ErrorResult& aRv) {
|
||||
MakeRefPtr<DOMMozPromiseRequestHolder<ClientStatePromise>>(mGlobal);
|
||||
|
||||
mHandle->Focus()
|
||||
->Then(mGlobal->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
mGlobal->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[ipcClientInfo, holder, outerPromise](const ClientState& aResult) {
|
||||
holder->Complete();
|
||||
NS_ENSURE_TRUE_VOID(holder->GetParentObject());
|
||||
RefPtr<Client> newClient = new Client(
|
||||
holder->GetParentObject(),
|
||||
RefPtr<Client> newClient =
|
||||
new Client(holder->GetParentObject(),
|
||||
ClientInfoAndState(ipcClientInfo, aResult.ToIPC()));
|
||||
outerPromise->MaybeResolve(newClient);
|
||||
},
|
||||
|
@ -32,7 +32,8 @@ void StartClientManagerOp(Func aFunc, const Arg& aArg, nsIGlobalObject* aGlobal,
|
||||
MakeRefPtr<DOMMozPromiseRequestHolder<ClientOpPromise>>(aGlobal);
|
||||
|
||||
aFunc(aArg, target)
|
||||
->Then(target, __func__,
|
||||
->Then(
|
||||
target, __func__,
|
||||
[aResolve, holder](const ClientOpResult& aResult) {
|
||||
holder->Complete();
|
||||
aResolve(aResult);
|
||||
|
@ -80,7 +80,8 @@ already_AddRefed<Promise> Clients::Get(const nsAString& aClientID,
|
||||
MakeRefPtr<DOMMozPromiseRequestHolder<ClientOpPromise>>(mGlobal);
|
||||
|
||||
innerPromise
|
||||
->Then(target, __func__,
|
||||
->Then(
|
||||
target, __func__,
|
||||
[outerPromise, holder, scope](const ClientOpResult& aResult) {
|
||||
holder->Complete();
|
||||
NS_ENSURE_TRUE_VOID(holder->GetParentObject());
|
||||
|
@ -110,7 +110,8 @@ RefPtr<GenericPromise> ClientHandle::Control(
|
||||
MOZ_RELEASE_ASSERT(ClientMatchPrincipalInfo(mClientInfo.PrincipalInfo(),
|
||||
aServiceWorker.PrincipalInfo()));
|
||||
|
||||
StartOp(ClientControlledArgs(aServiceWorker.ToIPC()),
|
||||
StartOp(
|
||||
ClientControlledArgs(aServiceWorker.ToIPC()),
|
||||
[outerPromise](const ClientOpResult& aResult) {
|
||||
outerPromise->Resolve(true, __func__);
|
||||
},
|
||||
@ -125,7 +126,8 @@ RefPtr<ClientStatePromise> ClientHandle::Focus() {
|
||||
RefPtr<ClientStatePromise::Private> outerPromise =
|
||||
new ClientStatePromise::Private(__func__);
|
||||
|
||||
StartOp(ClientFocusArgs(),
|
||||
StartOp(
|
||||
ClientFocusArgs(),
|
||||
[outerPromise](const ClientOpResult& aResult) {
|
||||
outerPromise->Resolve(
|
||||
ClientState::FromIPC(aResult.get_IPCClientState()), __func__);
|
||||
@ -156,7 +158,8 @@ RefPtr<GenericPromise> ClientHandle::PostMessage(
|
||||
RefPtr<GenericPromise::Private> outerPromise =
|
||||
new GenericPromise::Private(__func__);
|
||||
|
||||
StartOp(args,
|
||||
StartOp(
|
||||
args,
|
||||
[outerPromise](const ClientOpResult& aResult) {
|
||||
outerPromise->Resolve(true, __func__);
|
||||
},
|
||||
|
@ -62,7 +62,8 @@ void ClientHandleOpParent::Init(const ClientOpConstructorArgs& aArgs) {
|
||||
// Capturing 'this' is safe here because we disconnect the promise in
|
||||
// ActorDestroy() which ensures neither lambda is called if the actor
|
||||
// is destroyed before the source operation completes.
|
||||
p->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
p->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this](const ClientOpResult& aResult) {
|
||||
mPromiseRequestHolder.Complete();
|
||||
Unused << PClientHandleOpParent::Send__delete__(this, aResult);
|
||||
|
@ -24,7 +24,8 @@ void ClientManagerOpParent::DoServiceOp(Method aMethod, Args&&... aArgs) {
|
||||
// Capturing `this` is safe here because we disconnect the promise in
|
||||
// ActorDestroy() which ensures neither lambda is called if the actor
|
||||
// is destroyed before the source operation completes.
|
||||
p->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
p->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this](const mozilla::dom::ClientOpResult& aResult) {
|
||||
mPromiseRequestHolder.Complete();
|
||||
Unused << PClientManagerOpParent::Send__delete__(this, aResult);
|
||||
|
@ -287,7 +287,8 @@ void ClientNavigateOpChild::Init(const ClientNavigateOpConstructorArgs& aArgs) {
|
||||
// Capturing `this` is safe here since we clear the mPromiseRequestHolder in
|
||||
// ActorDestroy.
|
||||
promise
|
||||
->Then(mSerialEventTarget, __func__,
|
||||
->Then(
|
||||
mSerialEventTarget, __func__,
|
||||
[this](const ClientOpResult& aResult) {
|
||||
mPromiseRequestHolder.Complete();
|
||||
PClientNavigateOpChild::Send__delete__(this, aResult);
|
||||
|
@ -22,7 +22,8 @@ void ClientOpenWindowOpChild::ActorDestroy(ActorDestroyReason aReason) {
|
||||
|
||||
void ClientOpenWindowOpChild::Init(const ClientOpenWindowArgs& aArgs) {
|
||||
DoOpenWindow(aArgs)
|
||||
->Then(SystemGroup::EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other), __func__,
|
||||
[this](const ClientOpResult& aResult) {
|
||||
mPromiseRequestHolder.Complete();
|
||||
PClientOpenWindowOpChild::Send__delete__(this, aResult);
|
||||
|
@ -302,7 +302,8 @@ void WaitForLoad(const ClientOpenWindowArgs& aArgs,
|
||||
}
|
||||
|
||||
// Hold the listener alive until the promise settles
|
||||
ref->Then(aOuterWindow->EventTargetFor(TaskCategory::Other), __func__,
|
||||
ref->Then(
|
||||
aOuterWindow->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[listener](const ClientOpResult& aResult) {},
|
||||
[listener](nsresult aResult) {});
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ bool ClientMatchPrincipalInfo(const PrincipalInfo& aLeft,
|
||||
// null principal never matches
|
||||
return false;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Clients (windows/workers) should never have an expanded principal type.
|
||||
|
@ -603,7 +603,8 @@ RefPtr<ClientOpPromise> ClientSource::Claim(const ClientClaimArgs& aArgs) {
|
||||
auto holder = MakeRefPtr<DOMMozPromiseRequestHolder<GenericPromise>>(global);
|
||||
|
||||
innerPromise
|
||||
->Then(mEventTarget, __func__,
|
||||
->Then(
|
||||
mEventTarget, __func__,
|
||||
[outerPromise, holder](bool aResult) {
|
||||
holder->Complete();
|
||||
outerPromise->Resolve(NS_OK, __func__);
|
||||
|
@ -56,7 +56,8 @@ void ClientSourceOpChild::DoSourceOp(Method aMethod, const Args& aArgs) {
|
||||
// If the ClientSource is doing something async it may throw away the
|
||||
// promise on its side if the global is closed.
|
||||
promise
|
||||
->Then(target, __func__,
|
||||
->Then(
|
||||
target, __func__,
|
||||
[this, promise](const mozilla::dom::ClientOpResult& aResult) {
|
||||
mPromiseRequestHolder.Complete();
|
||||
Unused << PClientSourceOpChild::Send__delete__(this, aResult);
|
||||
|
@ -68,8 +68,8 @@ class ClientThing {
|
||||
|
||||
// Conditionally execute the given callable based on the current state.
|
||||
template <typename Callable>
|
||||
void MaybeExecute(const Callable& aSuccess,
|
||||
const std::function<void()>& aFailure = [] {}) {
|
||||
void MaybeExecute(
|
||||
const Callable& aSuccess, const std::function<void()>& aFailure = [] {}) {
|
||||
AssertIsValid();
|
||||
if (mShutdown) {
|
||||
aFailure();
|
||||
|
@ -58,7 +58,9 @@ bool ClientIsValidPrincipalInfo(const PrincipalInfo& aPrincipalInfo) {
|
||||
// cases in the future.
|
||||
return specOrigin == originOrigin;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Windows and workers should not have expanded URLs, etc.
|
||||
@ -144,7 +146,9 @@ bool ClientIsValidCreationURL(const PrincipalInfo& aPrincipalInfo,
|
||||
// queries anyway.
|
||||
return true;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Clients (windows/workers) should never have an expanded principal type.
|
||||
|
@ -29,7 +29,8 @@ static NotNull<const Encoding*> SearchEncodingProp(
|
||||
const EncodingProp (&aProperties)[N], const nsACString& aKey) {
|
||||
const nsCString& flat = PromiseFlatCString(aKey);
|
||||
size_t index;
|
||||
if (!BinarySearchIf(aProperties, 0, ArrayLength(aProperties),
|
||||
if (!BinarySearchIf(
|
||||
aProperties, 0, ArrayLength(aProperties),
|
||||
[&flat](const EncodingProp& aProperty) {
|
||||
return flat.Compare(aProperty.mKey);
|
||||
},
|
||||
|
@ -1296,7 +1296,9 @@ void EventStateManager::DispatchCrossProcessEvent(WidgetEvent* aEvent,
|
||||
remote->SendPluginEvent(*aEvent->AsPluginEvent());
|
||||
return;
|
||||
}
|
||||
default: { MOZ_CRASH("Attempt to send non-whitelisted event?"); }
|
||||
default: {
|
||||
MOZ_CRASH("Attempt to send non-whitelisted event?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6450,7 +6450,8 @@ bool HTMLMediaElement::TryRemoveMediaKeysAssociation() {
|
||||
if (mDecoder) {
|
||||
RefPtr<HTMLMediaElement> self = this;
|
||||
mDecoder->SetCDMProxy(nullptr)
|
||||
->Then(mAbstractMainThread, __func__,
|
||||
->Then(
|
||||
mAbstractMainThread, __func__,
|
||||
[self]() {
|
||||
self->mSetCDMRequest.Complete();
|
||||
|
||||
@ -6523,7 +6524,8 @@ bool HTMLMediaElement::TryMakeAssociationWithCDM(CDMProxy* aProxy) {
|
||||
// HTMLMediaElement should resolve or reject the DOM promise.
|
||||
RefPtr<HTMLMediaElement> self = this;
|
||||
mDecoder->SetCDMProxy(aProxy)
|
||||
->Then(mAbstractMainThread, __func__,
|
||||
->Then(
|
||||
mAbstractMainThread, __func__,
|
||||
[self]() {
|
||||
self->mSetCDMRequest.Complete();
|
||||
self->MakeAssociationWithCDMResolved();
|
||||
|
@ -1720,7 +1720,8 @@ mozilla::ipc::IPCResult BackgroundFactoryRequestChild::RecvPermissionChallenge(
|
||||
IPC::Principal ipcPrincipal(principal);
|
||||
|
||||
tabChild->SendIndexedDBPermissionRequest(ipcPrincipal)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this](const uint32_t& aPermission) {
|
||||
this->AssertIsOnOwningThread();
|
||||
MaybeCollectGarbageOnIPCMessage();
|
||||
|
@ -67,7 +67,8 @@ bool SharedStringMap::Get(const nsCString& aKey, nsAString& aValue) {
|
||||
bool SharedStringMap::Find(const nsCString& aKey, size_t* aIndex) {
|
||||
const auto& keys = KeyTable();
|
||||
|
||||
return BinarySearchIf(Entries(), 0, EntryCount(),
|
||||
return BinarySearchIf(
|
||||
Entries(), 0, EntryCount(),
|
||||
[&](const Entry& aEntry) {
|
||||
return aKey.Compare(keys.GetBare(aEntry.mKey));
|
||||
},
|
||||
|
@ -219,7 +219,9 @@ MaybeInvalidTabContext::MaybeInvalidTabContext(const IPCTabContext& aParams)
|
||||
|
||||
break;
|
||||
}
|
||||
default: { MOZ_CRASH(); }
|
||||
default: {
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
|
||||
bool rv;
|
||||
|
@ -158,7 +158,8 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TabParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITabParent)
|
||||
NS_INTERFACE_MAP_END
|
||||
NS_IMPL_CYCLE_COLLECTION(TabParent, mFrameElement, mBrowserDOMWindow, mLoadContext, mFrameLoader, mBrowsingContext)
|
||||
NS_IMPL_CYCLE_COLLECTION(TabParent, mFrameElement, mBrowserDOMWindow,
|
||||
mLoadContext, mFrameLoader, mBrowsingContext)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(TabParent)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(TabParent)
|
||||
|
||||
@ -3047,7 +3048,8 @@ TabParent::GetContentBlockingLog(Promise** aPromise) {
|
||||
copy.forget(aPromise);
|
||||
|
||||
auto cblPromise = SendGetContentBlockingLog();
|
||||
cblPromise->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
cblPromise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[jsPromise](Tuple<nsCString, bool>&& aResult) {
|
||||
if (Get<1>(aResult)) {
|
||||
NS_ConvertUTF8toUTF16 utf16(Get<0>(aResult));
|
||||
@ -3158,7 +3160,8 @@ void TabParent::RequestRootPaint(gfx::CrossProcessPaint* aPaint, IntRect aRect,
|
||||
|
||||
RefPtr<gfx::CrossProcessPaint> paint(aPaint);
|
||||
TabId tabId(GetTabId());
|
||||
promise->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
promise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[paint, tabId](PaintFragment&& aFragment) {
|
||||
paint->ReceiveFragment(tabId, std::move(aFragment));
|
||||
},
|
||||
@ -3173,7 +3176,8 @@ void TabParent::RequestSubPaint(gfx::CrossProcessPaint* aPaint, float aScale,
|
||||
|
||||
RefPtr<gfx::CrossProcessPaint> paint(aPaint);
|
||||
TabId tabId(GetTabId());
|
||||
promise->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
promise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[paint, tabId](PaintFragment&& aFragment) {
|
||||
paint->ReceiveFragment(tabId, std::move(aFragment));
|
||||
},
|
||||
|
@ -282,11 +282,11 @@ void BenchmarkPlayback::GlobalShutdown() {
|
||||
|
||||
if (mDecoder) {
|
||||
RefPtr<Benchmark> ref(mGlobalState);
|
||||
mDecoder->Flush()->Then(Thread(), __func__,
|
||||
mDecoder->Flush()->Then(
|
||||
Thread(), __func__,
|
||||
[ref, this]() {
|
||||
mDecoder->Shutdown()->Then(
|
||||
Thread(), __func__,
|
||||
[ref, this]() { FinalizeShutdown(); },
|
||||
Thread(), __func__, [ref, this]() { FinalizeShutdown(); },
|
||||
[]() { MOZ_CRASH("not reached"); });
|
||||
mDecoder = nullptr;
|
||||
},
|
||||
@ -345,7 +345,8 @@ void BenchmarkPlayback::InputExhausted() {
|
||||
mSampleIndex++;
|
||||
if (mSampleIndex == mSamples.Length() && !ref->mParameters.mStopAtFrame) {
|
||||
// Complete current frame decode then drain if still necessary.
|
||||
p->Then(Thread(), __func__,
|
||||
p->Then(
|
||||
Thread(), __func__,
|
||||
[ref, this](MediaDataDecoder::DecodedData&& aResults) {
|
||||
Output(std::move(aResults));
|
||||
if (!mFinished) {
|
||||
@ -365,7 +366,8 @@ void BenchmarkPlayback::InputExhausted() {
|
||||
mSampleIndex = 0;
|
||||
}
|
||||
// Continue decoding
|
||||
p->Then(Thread(), __func__,
|
||||
p->Then(
|
||||
Thread(), __func__,
|
||||
[ref, this](MediaDataDecoder::DecodedData&& aResults) {
|
||||
Output(std::move(aResults));
|
||||
if (!mFinished) {
|
||||
|
@ -387,9 +387,10 @@ void ChannelMediaDecoder::DownloadProgressed() {
|
||||
MediaStatistics stats = GetStatistics(rate, res, pos);
|
||||
return StatsPromise::CreateAndResolve(stats, __func__);
|
||||
})
|
||||
->Then(mAbstractMainThread, __func__,
|
||||
[=, self = RefPtr<ChannelMediaDecoder>(this)](
|
||||
MediaStatistics aStats) {
|
||||
->Then(
|
||||
mAbstractMainThread, __func__,
|
||||
[=,
|
||||
self = RefPtr<ChannelMediaDecoder>(this)](MediaStatistics aStats) {
|
||||
if (IsShutdown()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1055,7 +1055,8 @@ void DOMMediaStream::BlockPlaybackTrack(TrackPort* aTrack) {
|
||||
RefPtr<DOMMediaStream> that = this;
|
||||
aTrack
|
||||
->BlockSourceTrackId(aTrack->GetTrack()->mTrackID, BlockingMode::CREATION)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, that](bool aIgnore) { NotifyPlaybackTrackBlocked(); },
|
||||
[](const nsresult& aIgnore) {
|
||||
NS_ERROR("Could not remove track from MSG");
|
||||
|
@ -316,7 +316,8 @@ class MediaDecoderStateMachine::DecodeMetadataState
|
||||
// a raw pointer here.
|
||||
Reader()
|
||||
->ReadMetadata()
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this](MetadataHolder&& aMetadata) {
|
||||
OnMetadataRead(std::move(aMetadata));
|
||||
},
|
||||
@ -710,7 +711,8 @@ class MediaDecoderStateMachine::DecodingState
|
||||
TimeStamp target =
|
||||
TimeStamp::Now() + TimeDuration::FromMilliseconds(timeout);
|
||||
|
||||
mDormantTimer.Ensure(target,
|
||||
mDormantTimer.Ensure(
|
||||
target,
|
||||
[this]() {
|
||||
mDormantTimer.CompleteRequest();
|
||||
SetState<DormantState>();
|
||||
@ -818,18 +820,19 @@ class MediaDecoderStateMachine::LoopingDecodingState
|
||||
Reader()->ResetDecode(TrackInfo::kAudioTrack);
|
||||
Reader()
|
||||
->Seek(SeekTarget(media::TimeUnit::Zero(), SeekTarget::Accurate))
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this]() -> void {
|
||||
mAudioSeekRequest.Complete();
|
||||
SLOG(
|
||||
"seeking completed, start to request first sample, "
|
||||
"queueing audio task - queued=%zu, decoder-queued=%zu",
|
||||
AudioQueue().GetSize(),
|
||||
Reader()->SizeOfAudioQueueInFrames());
|
||||
AudioQueue().GetSize(), Reader()->SizeOfAudioQueueInFrames());
|
||||
|
||||
Reader()
|
||||
->RequestAudioData()
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this](RefPtr<AudioData> aAudio) {
|
||||
mIsReachingAudioEOS = false;
|
||||
mAudioDataRequest.Complete();
|
||||
@ -1233,7 +1236,8 @@ class MediaDecoderStateMachine::AccurateSeekingState
|
||||
|
||||
Reader()
|
||||
->WaitForData(aReject.mType)
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this](MediaData::Type aType) {
|
||||
SLOG("OnSeekRejected wait promise resolved");
|
||||
mWaitRequest.Complete();
|
||||
@ -2131,7 +2135,8 @@ void MediaDecoderStateMachine::StateObject::HandleResumeVideoDecoding(
|
||||
RefPtr<AbstractThread> mainThread = mMaster->mAbstractMainThread;
|
||||
|
||||
SetSeekingState(std::move(seekJob), EventVisibility::Suppressed)
|
||||
->Then(mainThread, __func__,
|
||||
->Then(
|
||||
mainThread, __func__,
|
||||
[start, info, hw]() { ReportRecoveryTelemetry(start, info, hw); },
|
||||
[]() {});
|
||||
}
|
||||
@ -2968,8 +2973,8 @@ void MediaDecoderStateMachine::SetVideoDecodeModeInternal(
|
||||
TimeStamp target = TimeStamp::Now() + SuspendBackgroundVideoDelay();
|
||||
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
mVideoDecodeSuspendTimer.Ensure(target,
|
||||
[=]() { self->OnSuspendTimerResolved(); },
|
||||
mVideoDecodeSuspendTimer.Ensure(
|
||||
target, [=]() { self->OnSuspendTimerResolved(); },
|
||||
[]() { MOZ_DIAGNOSTIC_ASSERT(false); });
|
||||
mOnPlaybackEvent.Notify(MediaPlaybackEvent::StartVideoSuspendTimer);
|
||||
return;
|
||||
@ -3064,7 +3069,8 @@ void MediaDecoderStateMachine::RequestAudioData() {
|
||||
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
mReader->RequestAudioData()
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this, self](RefPtr<AudioData> aAudio) {
|
||||
MOZ_ASSERT(aAudio);
|
||||
mAudioDataRequest.Complete();
|
||||
@ -3112,7 +3118,8 @@ void MediaDecoderStateMachine::RequestVideoData(
|
||||
TimeStamp videoDecodeStartTime = TimeStamp::Now();
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
mReader->RequestVideoData(aCurrentTime)
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[this, self, videoDecodeStartTime](RefPtr<VideoData> aVideo) {
|
||||
MOZ_ASSERT(aVideo);
|
||||
mVideoDataRequest.Complete();
|
||||
@ -3151,7 +3158,8 @@ void MediaDecoderStateMachine::WaitForData(MediaData::Type aType) {
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
if (aType == MediaData::Type::AUDIO_DATA) {
|
||||
mReader->WaitForData(MediaData::Type::AUDIO_DATA)
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self](MediaData::Type aType) {
|
||||
self->mAudioWaitRequest.Complete();
|
||||
MOZ_ASSERT(aType == MediaData::Type::AUDIO_DATA);
|
||||
@ -3164,7 +3172,8 @@ void MediaDecoderStateMachine::WaitForData(MediaData::Type aType) {
|
||||
->Track(mAudioWaitRequest);
|
||||
} else {
|
||||
mReader->WaitForData(MediaData::Type::VIDEO_DATA)
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self](MediaData::Type aType) {
|
||||
self->mVideoWaitRequest.Complete();
|
||||
MOZ_ASSERT(aType == MediaData::Type::VIDEO_DATA);
|
||||
@ -3464,7 +3473,8 @@ void MediaDecoderStateMachine::ScheduleStateMachineIn(const TimeUnit& aTime) {
|
||||
// It is OK to capture 'this' without causing UAF because the callback
|
||||
// always happens before shutdown.
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
mDelayedScheduler.Ensure(target,
|
||||
mDelayedScheduler.Ensure(
|
||||
target,
|
||||
[self]() {
|
||||
self->mDelayedScheduler.CompleteRequest();
|
||||
self->RunStateMachine();
|
||||
|
@ -65,7 +65,8 @@ already_AddRefed<Promise> MediaDevices::GetUserMedia(
|
||||
RefPtr<MediaDevices> self(this);
|
||||
MediaManager::Get()
|
||||
->GetUserMedia(GetOwner(), aConstraints, aCallerType)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, self, p](RefPtr<DOMMediaStream>&& aStream) {
|
||||
if (!GetWindowIfCurrent()) {
|
||||
return; // Leave Promise pending after navigation by design.
|
||||
@ -92,7 +93,8 @@ already_AddRefed<Promise> MediaDevices::EnumerateDevices(CallerType aCallerType,
|
||||
RefPtr<MediaDevices> self(this);
|
||||
MediaManager::Get()
|
||||
->EnumerateDevices(GetOwner(), aCallerType)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, self,
|
||||
p](RefPtr<MediaManager::MediaDeviceSetRefCnt>&& aDevices) {
|
||||
nsPIDOMWindowInner* window = GetWindowIfCurrent();
|
||||
@ -139,7 +141,8 @@ already_AddRefed<Promise> MediaDevices::GetDisplayMedia(
|
||||
RefPtr<MediaDevices> self(this);
|
||||
MediaManager::Get()
|
||||
->GetDisplayMedia(GetOwner(), aConstraints, aCallerType)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, self, p](RefPtr<DOMMediaStream>&& aStream) {
|
||||
if (!GetWindowIfCurrent()) {
|
||||
return; // leave promise pending after navigation.
|
||||
|
@ -336,7 +336,8 @@ void MediaFormatReader::DecoderFactory::RunStage(Data& aData) {
|
||||
case Stage::None: {
|
||||
MOZ_ASSERT(!aData.mToken);
|
||||
aData.mPolicy->Alloc()
|
||||
->Then(mOwner->OwnerThread(), __func__,
|
||||
->Then(
|
||||
mOwner->OwnerThread(), __func__,
|
||||
[this, &aData](RefPtr<Token> aToken) {
|
||||
aData.mTokenRequest.Complete();
|
||||
aData.mToken = aToken.forget();
|
||||
@ -475,14 +476,14 @@ void MediaFormatReader::DecoderFactory::DoInitDecoder(Data& aData) {
|
||||
DDLOGEX2("MediaFormatReader::DecoderFactory", this, DDLogCategory::Log,
|
||||
"initialize_decoder", DDNoValue{});
|
||||
aData.mDecoder->Init()
|
||||
->Then(mOwner->OwnerThread(), __func__,
|
||||
->Then(
|
||||
mOwner->OwnerThread(), __func__,
|
||||
[this, &aData, &ownerData](TrackType aTrack) {
|
||||
aData.mInitRequest.Complete();
|
||||
aData.mStage = Stage::None;
|
||||
MutexAutoLock lock(ownerData.mMutex);
|
||||
ownerData.mDecoder = aData.mDecoder.forget();
|
||||
ownerData.mDescription =
|
||||
ownerData.mDecoder->GetDescriptionName();
|
||||
ownerData.mDescription = ownerData.mDecoder->GetDescriptionName();
|
||||
DDLOGEX2("MediaFormatReader::DecoderFactory", this,
|
||||
DDLogCategory::Log, "decoder_initialized", DDNoValue{});
|
||||
DecoderDoctorLogger::LinkParentAndChild(
|
||||
@ -653,7 +654,8 @@ class MediaFormatReader::DemuxerProxy::Wrapper : public MediaTrackDemuxer {
|
||||
return InvokeAsync(
|
||||
mTaskQueue, __func__,
|
||||
[self, aTime]() { return self->mTrackDemuxer->Seek(aTime); })
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self](const TimeUnit& aTime) {
|
||||
self->UpdateRandomAccessPoint();
|
||||
return SeekPromise::CreateAndResolve(aTime, __func__);
|
||||
@ -670,7 +672,8 @@ class MediaFormatReader::DemuxerProxy::Wrapper : public MediaTrackDemuxer {
|
||||
[self, aNumSamples]() {
|
||||
return self->mTrackDemuxer->GetSamples(aNumSamples);
|
||||
})
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self](RefPtr<SamplesHolder> aSamples) {
|
||||
self->UpdateRandomAccessPoint();
|
||||
return SamplesPromise::CreateAndResolve(aSamples.forget(),
|
||||
@ -788,11 +791,12 @@ RefPtr<MediaDataDemuxer::InitPromise> MediaFormatReader::DemuxerProxy::Init() {
|
||||
}
|
||||
return data->mDemuxer->Init();
|
||||
})
|
||||
->Then(taskQueue, __func__,
|
||||
->Then(
|
||||
taskQueue, __func__,
|
||||
[data, taskQueue]() {
|
||||
if (!data->mDemuxer) { // Was shutdown.
|
||||
return InitPromise::CreateAndReject(
|
||||
NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_CANCELED,
|
||||
__func__);
|
||||
}
|
||||
data->mNumAudioTrack =
|
||||
data->mDemuxer->GetNumberTracks(TrackInfo::kAudioTrack);
|
||||
@ -1444,17 +1448,17 @@ void MediaFormatReader::DoDemuxVideo() {
|
||||
|
||||
if (mVideo.mFirstDemuxedSampleTime.isNothing()) {
|
||||
RefPtr<MediaFormatReader> self = this;
|
||||
p = p->Then(OwnerThread(), __func__,
|
||||
p = p->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self](RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples) {
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "video_first_demuxed",
|
||||
DDNoValue{});
|
||||
self->OnFirstDemuxCompleted(TrackInfo::kVideoTrack, aSamples);
|
||||
return SamplesPromise::CreateAndResolve(aSamples.forget(),
|
||||
__func__);
|
||||
return SamplesPromise::CreateAndResolve(aSamples.forget(), __func__);
|
||||
},
|
||||
[self](const MediaResult& aError) {
|
||||
DDLOGEX(self.get(), DDLogCategory::Log,
|
||||
"video_first_demuxing_error", aError);
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "video_first_demuxing_error",
|
||||
aError);
|
||||
self->OnFirstDemuxFailed(TrackInfo::kVideoTrack, aError);
|
||||
return SamplesPromise::CreateAndReject(aError, __func__);
|
||||
});
|
||||
@ -1522,17 +1526,17 @@ void MediaFormatReader::DoDemuxAudio() {
|
||||
|
||||
if (mAudio.mFirstDemuxedSampleTime.isNothing()) {
|
||||
RefPtr<MediaFormatReader> self = this;
|
||||
p = p->Then(OwnerThread(), __func__,
|
||||
p = p->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self](RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples) {
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "audio_first_demuxed",
|
||||
DDNoValue{});
|
||||
self->OnFirstDemuxCompleted(TrackInfo::kAudioTrack, aSamples);
|
||||
return SamplesPromise::CreateAndResolve(aSamples.forget(),
|
||||
__func__);
|
||||
return SamplesPromise::CreateAndResolve(aSamples.forget(), __func__);
|
||||
},
|
||||
[self](const MediaResult& aError) {
|
||||
DDLOGEX(self.get(), DDLogCategory::Log,
|
||||
"audio_first_demuxing_error", aError);
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "audio_first_demuxing_error",
|
||||
aError);
|
||||
self->OnFirstDemuxFailed(TrackInfo::kAudioTrack, aError);
|
||||
return SamplesPromise::CreateAndReject(aError, __func__);
|
||||
});
|
||||
@ -1993,7 +1997,8 @@ void MediaFormatReader::InternalSeek(TrackType aTrack,
|
||||
DDLOG(DDLogCategory::Log, "seeking", DDNoValue{});
|
||||
RefPtr<MediaFormatReader> self = this;
|
||||
decoder.mTrackDemuxer->Seek(decoder.mTimeThreshold.ref().Time())
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self, aTrack](TimeUnit aTime) {
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "seeked", DDNoValue{});
|
||||
auto& decoder = self->GetDecoderData(aTrack);
|
||||
@ -2010,19 +2015,19 @@ void MediaFormatReader::InternalSeek(TrackType aTrack,
|
||||
decoder.mSeekRequest.Complete();
|
||||
switch (aError.Code()) {
|
||||
case NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA:
|
||||
DDLOGEX(self.get(), DDLogCategory::Log,
|
||||
"seeking_interrupted", aError);
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "seeking_interrupted",
|
||||
aError);
|
||||
self->NotifyWaitingForData(aTrack);
|
||||
break;
|
||||
case NS_ERROR_DOM_MEDIA_END_OF_STREAM:
|
||||
DDLOGEX(self.get(), DDLogCategory::Log,
|
||||
"seeking_interrupted", aError);
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "seeking_interrupted",
|
||||
aError);
|
||||
decoder.mTimeThreshold.reset();
|
||||
self->NotifyEndOfStream(aTrack);
|
||||
break;
|
||||
case NS_ERROR_DOM_MEDIA_CANCELED:
|
||||
DDLOGEX(self.get(), DDLogCategory::Log,
|
||||
"seeking_interrupted", aError);
|
||||
DDLOGEX(self.get(), DDLogCategory::Log, "seeking_interrupted",
|
||||
aError);
|
||||
decoder.mTimeThreshold.reset();
|
||||
break;
|
||||
default:
|
||||
@ -2869,7 +2874,8 @@ void MediaFormatReader::NotifyDataArrived() {
|
||||
|
||||
RefPtr<MediaFormatReader> self = this;
|
||||
mDemuxer->NotifyDataArrived()
|
||||
->Then(OwnerThread(), __func__,
|
||||
->Then(
|
||||
OwnerThread(), __func__,
|
||||
[self]() {
|
||||
self->mNotifyDataArrivedPromise.Complete();
|
||||
self->UpdateBuffered();
|
||||
|
@ -3139,7 +3139,8 @@ RefPtr<MediaManager::MgrPromise> MediaManager::EnumerateDevicesImpl(
|
||||
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::AbortError),
|
||||
__func__);
|
||||
})
|
||||
->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[aWindowId, originKey, aVideoInputEnumType, aAudioInputEnumType,
|
||||
aVideoInputType, aAudioInputType, aOutDevices](bool) {
|
||||
// Only run if window is still on our active list.
|
||||
@ -3172,8 +3173,7 @@ RefPtr<MediaManager::MgrPromise> MediaManager::EnumerateDevicesImpl(
|
||||
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::AbortError),
|
||||
__func__);
|
||||
}
|
||||
MediaManager::AnonymizeDevices(*aOutDevices, *originKey,
|
||||
aWindowId);
|
||||
MediaManager::AnonymizeDevices(*aOutDevices, *originKey, aWindowId);
|
||||
return MgrPromise::CreateAndResolve(false, __func__);
|
||||
},
|
||||
[](RefPtr<MediaMgrError>&& aError) {
|
||||
@ -3250,7 +3250,8 @@ RefPtr<MediaManager::DevicesPromise> MediaManager::EnumerateDevices(
|
||||
MediaSourceEnum::Microphone, audioOutputType,
|
||||
videoEnumerationType, audioEnumerationType, false,
|
||||
devices)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[windowListener, sourceListener, devices](bool) {
|
||||
DebugOnly<bool> rv = windowListener->Remove(sourceListener);
|
||||
MOZ_ASSERT(rv);
|
||||
@ -3262,8 +3263,7 @@ RefPtr<MediaManager::DevicesPromise> MediaManager::EnumerateDevices(
|
||||
// Attempt to clean it here, just in case, but ignore the return
|
||||
// value.
|
||||
Unused << windowListener->Remove(sourceListener);
|
||||
return DevicesPromise::CreateAndReject(std::move(aError),
|
||||
__func__);
|
||||
return DevicesPromise::CreateAndReject(std::move(aError), __func__);
|
||||
});
|
||||
}
|
||||
|
||||
@ -3298,7 +3298,8 @@ RefPtr<SinkInfoPromise> MediaManager::GetSinkDevice(nsPIDOMWindowInner* aWindow,
|
||||
MediaSourceEnum::Other, MediaSinkEnum::Speaker,
|
||||
DeviceEnumerationType::Normal,
|
||||
DeviceEnumerationType::Normal, true, devices)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[aDeviceId, isSecure, devices](bool) {
|
||||
for (RefPtr<MediaDevice>& device : *devices) {
|
||||
if (aDeviceId.IsEmpty() && device->mSinkInfo->Preferred()) {
|
||||
@ -4174,7 +4175,8 @@ SourceListener::InitializeAsync() {
|
||||
LOG("started all sources");
|
||||
aHolder.Resolve(true, __func__);
|
||||
})
|
||||
->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[self = RefPtr<SourceListener>(this), this]() {
|
||||
if (mStopped) {
|
||||
// We were shut down during the async init
|
||||
@ -4199,8 +4201,8 @@ SourceListener::InitializeAsync() {
|
||||
[self = RefPtr<SourceListener>(this),
|
||||
this](RefPtr<MediaMgrError>&& aResult) {
|
||||
if (mStopped) {
|
||||
return SourceListenerPromise::CreateAndReject(
|
||||
std::move(aResult), __func__);
|
||||
return SourceListenerPromise::CreateAndReject(std::move(aResult),
|
||||
__func__);
|
||||
}
|
||||
|
||||
for (DeviceState* state :
|
||||
|
@ -884,7 +884,8 @@ class MediaRecorder::Session : public PrincipalChangeObserver<MediaStreamTrack>,
|
||||
}
|
||||
gSessions.Clear();
|
||||
ShutdownPromise::All(GetCurrentThreadSerialEventTarget(), promises)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[ticket]() mutable {
|
||||
MOZ_ASSERT(gSessions.Count() == 0);
|
||||
// Unblock shutdown
|
||||
@ -1714,7 +1715,8 @@ RefPtr<MediaRecorder::SizeOfPromise> MediaRecorder::SizeOfExcludingThis(
|
||||
}
|
||||
|
||||
SizeOfPromise::All(GetCurrentThreadSerialEventTarget(), promises)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[holder](const nsTArray<size_t>& sizes) {
|
||||
size_t total = 0;
|
||||
for (const size_t& size : sizes) {
|
||||
|
@ -80,7 +80,8 @@ RefPtr<ReaderProxy::VideoDataPromise> ReaderProxy::RequestVideoData(
|
||||
int64_t startTime = StartTime().ToMicroseconds();
|
||||
return InvokeAsync(mReader->OwnerThread(), mReader.get(), __func__,
|
||||
&MediaFormatReader::RequestVideoData, threshold)
|
||||
->Then(mOwnerThread, __func__,
|
||||
->Then(
|
||||
mOwnerThread, __func__,
|
||||
[startTime](RefPtr<VideoData> aVideo) {
|
||||
aVideo->AdjustForStartTime(startTime);
|
||||
return aVideo->mTime.IsValid()
|
||||
|
@ -93,10 +93,11 @@ class VideoFrameConverter {
|
||||
mLastFrameQueuedForPacing = t;
|
||||
|
||||
mPacingTimer->WaitUntil(t, __func__)
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self = RefPtr<VideoFrameConverter>(this), this,
|
||||
image = RefPtr<layers::Image>(aChunk.mFrame.GetImage()), t,
|
||||
size, aForceBlack]() mutable {
|
||||
image = RefPtr<layers::Image>(aChunk.mFrame.GetImage()), t, size,
|
||||
aForceBlack]() mutable {
|
||||
QueueForProcessing(std::move(image), t, size, aForceBlack);
|
||||
},
|
||||
[] {});
|
||||
|
@ -793,7 +793,9 @@ static bool CheckRequirement(const MediaKeysRequirement aRequirement,
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { return false; }
|
||||
default: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the requirement member of accumulated configuration to equal
|
||||
|
@ -233,7 +233,9 @@ nsresult VP8TrackEncoder::GetEncodedPartitions(EncodedFrameContainer& aData) {
|
||||
pkt->data.frame.sz);
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// End of frame
|
||||
if ((pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT) == 0) {
|
||||
|
@ -392,7 +392,8 @@ mozilla::ipc::IPCResult ChromiumCDMChild::RecvInit(
|
||||
mPersistentStateAllowed = aAllowPersistentState;
|
||||
|
||||
RefPtr<ChromiumCDMChild::InitPromise> promise = mInitPromise.Ensure(__func__);
|
||||
promise->Then(mPlugin->GMPMessageLoop()->SerialEventTarget(), __func__,
|
||||
promise->Then(
|
||||
mPlugin->GMPMessageLoop()->SerialEventTarget(), __func__,
|
||||
[aResolver](bool /* unused */) { aResolver(true); },
|
||||
[aResolver](nsresult rv) {
|
||||
GMP_LOG(
|
||||
|
@ -93,7 +93,8 @@ void ChromiumCDMProxy::Init(PromiseId aPromiseId, const nsAString& aOrigin,
|
||||
cdm->Init(self->mCallback.get(),
|
||||
self->mDistinctiveIdentifierRequired,
|
||||
self->mPersistentStateRequired, self->mMainThread)
|
||||
->Then(thread, __func__,
|
||||
->Then(
|
||||
thread, __func__,
|
||||
[self, aPromiseId, cdm](bool /* unused */) {
|
||||
// CDM init succeeded
|
||||
{
|
||||
|
@ -355,7 +355,8 @@ GeckoMediaPluginService::GetDecryptingGMPVideoDecoder(
|
||||
RefPtr<GMPCrashHelper> helper(aHelper);
|
||||
GetContentParent(aHelper, aNodeId, NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
|
||||
*aTags)
|
||||
->Then(thread, __func__,
|
||||
->Then(
|
||||
thread, __func__,
|
||||
[rawCallback, helper,
|
||||
aDecryptorId](RefPtr<GMPContentParent::CloseBlocker> wrapper) {
|
||||
RefPtr<GMPContentParent> parent = wrapper->mParent;
|
||||
@ -395,7 +396,8 @@ GeckoMediaPluginService::GetGMPVideoEncoder(
|
||||
RefPtr<GMPCrashHelper> helper(aHelper);
|
||||
GetContentParent(aHelper, aNodeId, NS_LITERAL_CSTRING(GMP_API_VIDEO_ENCODER),
|
||||
*aTags)
|
||||
->Then(thread, __func__,
|
||||
->Then(
|
||||
thread, __func__,
|
||||
[rawCallback,
|
||||
helper](RefPtr<GMPContentParent::CloseBlocker> wrapper) {
|
||||
RefPtr<GMPContentParent> parent = wrapper->mParent;
|
||||
|
@ -401,7 +401,8 @@ void GeckoMediaPluginServiceParent::InitializePlugins(
|
||||
RefPtr<GenericPromise> p = mInitPromise.Ensure(__func__);
|
||||
InvokeAsync(aAbstractGMPThread, this, __func__,
|
||||
&GeckoMediaPluginServiceParent::LoadFromEnvironment)
|
||||
->Then(aAbstractGMPThread, __func__,
|
||||
->Then(
|
||||
aAbstractGMPThread, __func__,
|
||||
[self]() -> void {
|
||||
MonitorAutoLock lock(self->mInitPromiseMonitor);
|
||||
self->mLoadPluginsFromDiskComplete = true;
|
||||
@ -507,11 +508,11 @@ RefPtr<GenericPromise> GeckoMediaPluginServiceParent::LoadFromEnvironment() {
|
||||
|
||||
mScannedPluginOnDisk = true;
|
||||
return GenericPromise::All(thread, promises)
|
||||
->Then(thread, __func__,
|
||||
->Then(
|
||||
thread, __func__,
|
||||
[]() { return GenericPromise::CreateAndResolve(true, __func__); },
|
||||
[]() {
|
||||
return GenericPromise::CreateAndReject(NS_ERROR_FAILURE,
|
||||
__func__);
|
||||
return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
|
||||
});
|
||||
}
|
||||
|
||||
@ -612,7 +613,8 @@ RefPtr<GenericPromise> GeckoMediaPluginServiceParent::AsyncAddPluginDirectory(
|
||||
RefPtr<GeckoMediaPluginServiceParent> self = this;
|
||||
return InvokeAsync(thread, this, __func__,
|
||||
&GeckoMediaPluginServiceParent::AddOnGMPThread, dir)
|
||||
->Then(mMainThread, __func__,
|
||||
->Then(
|
||||
mMainThread, __func__,
|
||||
[dir, self](bool aVal) {
|
||||
LOGD(
|
||||
("GeckoMediaPluginServiceParent::AsyncAddPluginDirectory %s "
|
||||
|
@ -399,7 +399,8 @@ class CDMStorageTest {
|
||||
RefPtr<gmp::GetCDMParentPromise> promise =
|
||||
service->GetCDM(aNodeId, std::move(tags), nullptr);
|
||||
auto thread = GetAbstractGMPThread();
|
||||
promise->Then(thread, __func__,
|
||||
promise->Then(
|
||||
thread, __func__,
|
||||
[self, aUpdates, thread](RefPtr<gmp::ChromiumCDMParent> cdm) {
|
||||
self->mCDM = cdm;
|
||||
EXPECT_TRUE(!!self->mCDM);
|
||||
@ -408,7 +409,8 @@ class CDMStorageTest {
|
||||
self->mCDM
|
||||
->Init(self->mCallback.get(), false, true,
|
||||
GetMainThreadEventTarget())
|
||||
->Then(thread, __func__,
|
||||
->Then(
|
||||
thread, __func__,
|
||||
[self, aUpdates] {
|
||||
for (auto& update : aUpdates) {
|
||||
self->Update(update);
|
||||
|
@ -153,7 +153,8 @@ TEST(MP4Demuxer, Seek) {
|
||||
binding->mVideoTrack =
|
||||
binding->mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
|
||||
binding->CheckTrackSamples(binding->mVideoTrack)
|
||||
->Then(binding->mTaskQueue, __func__,
|
||||
->Then(
|
||||
binding->mTaskQueue, __func__,
|
||||
[binding]() {
|
||||
binding->CheckTrackKeyFrame(binding->mVideoTrack)
|
||||
->Then(
|
||||
@ -318,11 +319,11 @@ TEST(MP4Demuxer, CENCFragVideo) {
|
||||
binding->mVideoTrack =
|
||||
binding->mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
|
||||
binding->CheckTrackSamples(binding->mVideoTrack)
|
||||
->Then(binding->mTaskQueue, __func__,
|
||||
->Then(
|
||||
binding->mTaskQueue, __func__,
|
||||
[binding, video]() {
|
||||
for (uint32_t i = 0; i < binding->mSamples.Length(); i++) {
|
||||
nsCString text =
|
||||
ToCryptoString(binding->mSamples[i]->mCrypto);
|
||||
nsCString text = ToCryptoString(binding->mSamples[i]->mCrypto);
|
||||
EXPECT_STREQ(video[i++], text.get());
|
||||
}
|
||||
EXPECT_EQ(ArrayLength(video), binding->mSamples.Length());
|
||||
@ -531,12 +532,12 @@ TEST(MP4Demuxer, CENCFragAudio) {
|
||||
binding->mAudioTrack =
|
||||
binding->mDemuxer->GetTrackDemuxer(TrackInfo::kAudioTrack, 0);
|
||||
binding->CheckTrackSamples(binding->mAudioTrack)
|
||||
->Then(binding->mTaskQueue, __func__,
|
||||
->Then(
|
||||
binding->mTaskQueue, __func__,
|
||||
[binding, audio]() {
|
||||
EXPECT_TRUE(binding->mSamples.Length() > 1);
|
||||
for (uint32_t i = 0; i < binding->mSamples.Length(); i++) {
|
||||
nsCString text =
|
||||
ToCryptoString(binding->mSamples[i]->mCrypto);
|
||||
nsCString text = ToCryptoString(binding->mSamples[i]->mCrypto);
|
||||
EXPECT_STREQ(audio[i++], text.get());
|
||||
}
|
||||
EXPECT_EQ(ArrayLength(audio), binding->mSamples.Length());
|
||||
|
@ -85,7 +85,8 @@ void WaitForShutdown(RefPtr<MediaDataEncoder> aEncoder) {
|
||||
Maybe<bool> result;
|
||||
// media::Await() supports exclusive promises only, but ShutdownPromise is
|
||||
// not.
|
||||
aEncoder->Shutdown()->Then(AbstractThread::MainThread(), __func__,
|
||||
aEncoder->Shutdown()->Then(
|
||||
AbstractThread::MainThread(), __func__,
|
||||
[&result](bool rv) {
|
||||
EXPECT_TRUE(rv);
|
||||
result = Some(true);
|
||||
@ -115,7 +116,8 @@ static bool EnsureInit(RefPtr<MediaDataEncoder> aEncoder) {
|
||||
}
|
||||
|
||||
bool succeeded;
|
||||
media::Await(GetMediaThreadPool(MediaThreadType::PLAYBACK), aEncoder->Init(),
|
||||
media::Await(
|
||||
GetMediaThreadPool(MediaThreadType::PLAYBACK), aEncoder->Init(),
|
||||
[&succeeded](TrackInfo::TrackType t) {
|
||||
EXPECT_EQ(TrackInfo::TrackType::kVideoTrack, t);
|
||||
succeeded = true;
|
||||
@ -149,8 +151,8 @@ static MediaDataEncoder::EncodedData Encode(
|
||||
kImageSize, 0, TimeUnit::FromMicroseconds(i * 30000),
|
||||
TimeUnit::FromMicroseconds(30000), img, (i & 0xF) == 0,
|
||||
TimeUnit::FromMicroseconds(i * 30000));
|
||||
media::Await(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
aEncoder->Encode(frame),
|
||||
media::Await(
|
||||
GetMediaThreadPool(MediaThreadType::PLAYBACK), aEncoder->Encode(frame),
|
||||
[&output, &succeeded](MediaDataEncoder::EncodedData encoded) {
|
||||
output.AppendElements(std::move(encoded));
|
||||
succeeded = true;
|
||||
@ -177,8 +179,8 @@ static MediaDataEncoder::EncodedData Encode(
|
||||
}
|
||||
|
||||
if (pending > 0) {
|
||||
media::Await(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
aEncoder->Drain(),
|
||||
media::Await(
|
||||
GetMediaThreadPool(MediaThreadType::PLAYBACK), aEncoder->Drain(),
|
||||
[&succeeded](MediaDataEncoder::EncodedData encoded) {
|
||||
EXPECT_EQ(encoded.Length(), 0UL);
|
||||
succeeded = true;
|
||||
|
@ -65,8 +65,7 @@ already_AddRefed<MediaDataDecoder> RemoteDecoderModule::CreateAudioDecoder(
|
||||
MediaResult result(NS_OK);
|
||||
RefPtr<Runnable> task = NS_NewRunnableFunction(
|
||||
"RemoteDecoderModule::CreateAudioDecoder", [&, child]() {
|
||||
result = child->InitIPDL(aParams.AudioConfig(),
|
||||
aParams.mOptions);
|
||||
result = child->InitIPDL(aParams.AudioConfig(), aParams.mOptions);
|
||||
});
|
||||
SyncRunnable::DispatchToThread(RemoteDecoderManagerChild::GetManagerThread(),
|
||||
task);
|
||||
@ -100,8 +99,7 @@ already_AddRefed<MediaDataDecoder> RemoteDecoderModule::CreateVideoDecoder(
|
||||
MediaResult result(NS_OK);
|
||||
RefPtr<Runnable> task = NS_NewRunnableFunction(
|
||||
"RemoteDecoderModule::CreateVideoDecoder", [&, child]() {
|
||||
result = child->InitIPDL(aParams.VideoConfig(),
|
||||
aParams.mRate.mValue,
|
||||
result = child->InitIPDL(aParams.VideoConfig(), aParams.mRate.mValue,
|
||||
aParams.mOptions);
|
||||
});
|
||||
SyncRunnable::DispatchToThread(RemoteDecoderManagerChild::GetManagerThread(),
|
||||
|
@ -41,13 +41,14 @@ void RemoteDecoderParent::Destroy() {
|
||||
mozilla::ipc::IPCResult RemoteDecoderParent::RecvInit() {
|
||||
MOZ_ASSERT(OnManagerThread());
|
||||
RefPtr<RemoteDecoderParent> self = this;
|
||||
mDecoder->Init()->Then(mManagerTaskQueue, __func__,
|
||||
mDecoder->Init()->Then(
|
||||
mManagerTaskQueue, __func__,
|
||||
[self](TrackInfo::TrackType aTrack) {
|
||||
MOZ_ASSERT(aTrack == TrackInfo::kAudioTrack ||
|
||||
aTrack == TrackInfo::kVideoTrack);
|
||||
if (self->mDecoder) {
|
||||
Unused << self->SendInitComplete(
|
||||
aTrack, self->mDecoder->GetDescriptionName(),
|
||||
Unused << self->SendInitComplete(aTrack,
|
||||
self->mDecoder->GetDescriptionName(),
|
||||
self->mDecoder->NeedsConversion());
|
||||
}
|
||||
},
|
||||
|
@ -44,10 +44,11 @@ RefPtr<MediaDataDecoder::InitPromise> RemoteMediaDataDecoder::Init() {
|
||||
RefPtr<RemoteMediaDataDecoder> self = this;
|
||||
return InvokeAsync(mAbstractManagerThread, __func__,
|
||||
[self]() { return self->mChild->Init(); })
|
||||
->Then(mAbstractManagerThread, __func__,
|
||||
->Then(
|
||||
mAbstractManagerThread, __func__,
|
||||
[self, this](TrackType aTrack) {
|
||||
mDescription = mChild->GetDescriptionName() +
|
||||
NS_LITERAL_CSTRING(" (remote)");
|
||||
mDescription =
|
||||
mChild->GetDescriptionName() + NS_LITERAL_CSTRING(" (remote)");
|
||||
mIsHardwareAccelerated =
|
||||
mChild->IsHardwareAccelerated(mHardwareAcceleratedReason);
|
||||
mConversion = mChild->NeedsConversion();
|
||||
|
@ -262,7 +262,8 @@ nsresult VideoSink::Start(const TimeUnit& aStartTime, const MediaInfo& aInfo) {
|
||||
RefPtr<EndedPromise> p = mAudioSink->OnEnded(TrackInfo::kVideoTrack);
|
||||
if (p) {
|
||||
RefPtr<VideoSink> self = this;
|
||||
p->Then(mOwnerThread, __func__,
|
||||
p->Then(
|
||||
mOwnerThread, __func__,
|
||||
[self]() {
|
||||
self->mVideoSinkEndRequest.Complete();
|
||||
self->TryUpdateRenderedVideoFrames();
|
||||
|
@ -328,7 +328,8 @@ void SourceBuffer::RangeRemoval(double aStart, double aEnd) {
|
||||
RefPtr<SourceBuffer> self = this;
|
||||
mTrackBuffersManager
|
||||
->RangeRemoval(TimeUnit::FromSeconds(aStart), TimeUnit::FromSeconds(aEnd))
|
||||
->Then(mAbstractMainThread, __func__,
|
||||
->Then(
|
||||
mAbstractMainThread, __func__,
|
||||
[self](bool) {
|
||||
self->mPendingRemoval.Complete();
|
||||
self->StopUpdating();
|
||||
|
@ -811,7 +811,8 @@ void TrackBuffersManager::SegmentParserLoop() {
|
||||
// run the coded frame processing algorithm.
|
||||
RefPtr<TrackBuffersManager> self = this;
|
||||
CodedFrameProcessing()
|
||||
->Then(TaskQueueFromTaskQueue(), __func__,
|
||||
->Then(
|
||||
TaskQueueFromTaskQueue(), __func__,
|
||||
[self](bool aNeedMoreData) {
|
||||
self->mProcessingRequest.Complete();
|
||||
if (aNeedMoreData) {
|
||||
|
@ -140,7 +140,8 @@ auto SingleAllocPolicy::Alloc() -> RefPtr<Promise> {
|
||||
RefPtr<Promise> p = self->mPendingPromise.Ensure(__func__);
|
||||
GlobalAllocPolicy::Instance(self->mTrack)
|
||||
->Alloc()
|
||||
->Then(self->mOwnerThread, __func__,
|
||||
->Then(
|
||||
self->mOwnerThread, __func__,
|
||||
[self, localToken = std::move(localToken)](
|
||||
RefPtr<Token> aToken) mutable {
|
||||
self->mTokenRequest.Complete();
|
||||
@ -212,7 +213,8 @@ AllocationWrapper::CreateDecoder(const CreateDecoderParams& aParams,
|
||||
RefPtr<AllocateDecoderPromise> p =
|
||||
(aPolicy ? aPolicy : GlobalAllocPolicy::Instance(aParams.mType))
|
||||
->Alloc()
|
||||
->Then(AbstractThread::GetCurrent(), __func__,
|
||||
->Then(
|
||||
AbstractThread::GetCurrent(), __func__,
|
||||
[=](RefPtr<Token> aToken) {
|
||||
// result may not always be updated by
|
||||
// PDMFactory::CreateDecoder either when the creation
|
||||
@ -236,11 +238,10 @@ AllocationWrapper::CreateDecoder(const CreateDecoderParams& aParams,
|
||||
onWaitingForKeyEvent,
|
||||
options,
|
||||
rate};
|
||||
RefPtr<MediaDataDecoder> decoder =
|
||||
pdm->CreateDecoder(params);
|
||||
RefPtr<MediaDataDecoder> decoder = pdm->CreateDecoder(params);
|
||||
if (decoder) {
|
||||
RefPtr<AllocationWrapper> wrapper = new AllocationWrapper(
|
||||
decoder.forget(), aToken.forget());
|
||||
RefPtr<AllocationWrapper> wrapper =
|
||||
new AllocationWrapper(decoder.forget(), aToken.forget());
|
||||
return AllocateDecoderPromise::CreateAndResolve(wrapper,
|
||||
__func__);
|
||||
}
|
||||
|
@ -101,7 +101,8 @@ class EMEDecryptor : public MediaDataDecoder,
|
||||
RefPtr<DecodePromise> p = mDecodePromise.Ensure(__func__);
|
||||
|
||||
mSamplesWaitingForKey->WaitIfKeyNotUsable(sample)
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self](const RefPtr<MediaRawData>& aSample) {
|
||||
self->mKeyRequest.Complete();
|
||||
self->ThrottleDecode(aSample);
|
||||
@ -118,7 +119,8 @@ class EMEDecryptor : public MediaDataDecoder,
|
||||
|
||||
RefPtr<EMEDecryptor> self = this;
|
||||
mThroughputLimiter.Throttle(aSample)
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self](RefPtr<MediaRawData> aSample) {
|
||||
self->mThrottleRequest.Complete();
|
||||
self->AttemptDecode(aSample);
|
||||
@ -311,14 +313,15 @@ RefPtr<MediaDataDecoder::DecodePromise> EMEMediaDataDecoderProxy::Decode(
|
||||
return InvokeAsync(mThread, __func__, [self, this, sample]() {
|
||||
RefPtr<DecodePromise> p = mDecodePromise.Ensure(__func__);
|
||||
mSamplesWaitingForKey->WaitIfKeyNotUsable(sample)
|
||||
->Then(mThread, __func__,
|
||||
->Then(
|
||||
mThread, __func__,
|
||||
[self, this](RefPtr<MediaRawData> aSample) {
|
||||
mKeyRequest.Complete();
|
||||
|
||||
MediaDataDecoderProxy::Decode(aSample)
|
||||
->Then(mThread, __func__,
|
||||
[self, this](
|
||||
DecodePromise::ResolveOrRejectValue&& aValue) {
|
||||
[self,
|
||||
this](DecodePromise::ResolveOrRejectValue&& aValue) {
|
||||
mDecodeRequest.Complete();
|
||||
mDecodePromise.ResolveOrReject(std::move(aValue),
|
||||
__func__);
|
||||
|
@ -139,7 +139,8 @@ RefPtr<MediaDataDecoder::InitPromise> OmxDataDecoder::Init() {
|
||||
|
||||
RefPtr<InitPromise> p = mInitPromise.Ensure(__func__);
|
||||
mOmxLayer->Init(mTrackInfo.get())
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self, this]() {
|
||||
// Omx state should be OMX_StateIdle.
|
||||
mOmxState = mOmxLayer->GetState();
|
||||
@ -211,7 +212,8 @@ RefPtr<ShutdownPromise> OmxDataDecoder::DoAsyncShutdown() {
|
||||
// Flush to all ports, so all buffers can be returned from component.
|
||||
RefPtr<OmxDataDecoder> self = this;
|
||||
mOmxLayer->SendCommand(OMX_CommandFlush, OMX_ALL, nullptr)
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self]() -> RefPtr<OmxCommandPromise> {
|
||||
LOGL("DoAsyncShutdown: flush complete");
|
||||
return self->mOmxLayer->SendCommand(OMX_CommandStateSet,
|
||||
@ -221,7 +223,8 @@ RefPtr<ShutdownPromise> OmxDataDecoder::DoAsyncShutdown() {
|
||||
self->mOmxLayer->Shutdown();
|
||||
return OmxCommandPromise::CreateAndReject(aError, __func__);
|
||||
})
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self]() -> RefPtr<OmxCommandPromise> {
|
||||
RefPtr<OmxCommandPromise> p = self->mOmxLayer->SendCommand(
|
||||
OMX_CommandStateSet, OMX_StateLoaded, nullptr);
|
||||
@ -263,7 +266,8 @@ RefPtr<ShutdownPromise> OmxDataDecoder::DoAsyncShutdown() {
|
||||
self->mMediaDataHelper = nullptr;
|
||||
return ShutdownPromise::CreateAndReject(false, __func__);
|
||||
})
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self]() {
|
||||
self->mOmxTaskQueue->BeginShutdown();
|
||||
self->mOmxTaskQueue->AwaitShutdownAndIdle();
|
||||
@ -325,7 +329,8 @@ void OmxDataDecoder::Output(BufferData* aData) {
|
||||
|
||||
RefPtr<OmxDataDecoder> self = this;
|
||||
RefPtr<BufferData> buffer = aData;
|
||||
p->Then(mOmxTaskQueue, __func__,
|
||||
p->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self, buffer]() {
|
||||
MOZ_RELEASE_ASSERT(buffer->mStatus ==
|
||||
BufferData::BufferStatus::OMX_CLIENT_OUTPUT);
|
||||
@ -514,15 +519,15 @@ void OmxDataDecoder::OmxStateRunner() {
|
||||
// Send OpenMax state command to OMX_StateIdle.
|
||||
RefPtr<OmxDataDecoder> self = this;
|
||||
mOmxLayer->SendCommand(OMX_CommandStateSet, OMX_StateIdle, nullptr)
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self]() {
|
||||
// Current state should be OMX_StateIdle.
|
||||
self->mOmxState = self->mOmxLayer->GetState();
|
||||
MOZ_ASSERT(self->mOmxState == OMX_StateIdle);
|
||||
},
|
||||
[self]() {
|
||||
self->RejectInitPromise(NS_ERROR_DOM_MEDIA_FATAL_ERR,
|
||||
__func__);
|
||||
self->RejectInitPromise(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
|
||||
});
|
||||
|
||||
// Allocate input and output buffers.
|
||||
@ -538,7 +543,8 @@ void OmxDataDecoder::OmxStateRunner() {
|
||||
} else if (mOmxState == OMX_StateIdle) {
|
||||
RefPtr<OmxDataDecoder> self = this;
|
||||
mOmxLayer->SendCommand(OMX_CommandStateSet, OMX_StateExecuting, nullptr)
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self]() {
|
||||
self->mOmxState = self->mOmxLayer->GetState();
|
||||
MOZ_ASSERT(self->mOmxState == OMX_StateExecuting);
|
||||
@ -546,8 +552,7 @@ void OmxDataDecoder::OmxStateRunner() {
|
||||
self->ResolveInitPromise(__func__);
|
||||
},
|
||||
[self]() {
|
||||
self->RejectInitPromise(NS_ERROR_DOM_MEDIA_FATAL_ERR,
|
||||
__func__);
|
||||
self->RejectInitPromise(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
|
||||
});
|
||||
} else if (mOmxState == OMX_StateExecuting) {
|
||||
// Configure codec once it gets OMX_StateExecuting state.
|
||||
@ -728,13 +733,13 @@ void OmxDataDecoder::PortSettingsChanged() {
|
||||
LOG("PortSettingsChanged: disable port %lu", def.nPortIndex);
|
||||
mOmxLayer
|
||||
->SendCommand(OMX_CommandPortDisable, mPortSettingsChanged, nullptr)
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self, def]() -> RefPtr<OmxCommandPromise> {
|
||||
// 3. enable port.
|
||||
// Send enable port command.
|
||||
RefPtr<OmxCommandPromise> p = self->mOmxLayer->SendCommand(
|
||||
OMX_CommandPortEnable, self->mPortSettingsChanged,
|
||||
nullptr);
|
||||
OMX_CommandPortEnable, self->mPortSettingsChanged, nullptr);
|
||||
|
||||
// 4. allocate port buffers.
|
||||
// Allocate new port buffers.
|
||||
@ -749,7 +754,8 @@ void OmxDataDecoder::PortSettingsChanged() {
|
||||
self->NotifyError(OMX_ErrorUndefined, __func__);
|
||||
return OmxCommandPromise::CreateAndReject(aError, __func__);
|
||||
})
|
||||
->Then(mOmxTaskQueue, __func__,
|
||||
->Then(
|
||||
mOmxTaskQueue, __func__,
|
||||
[self]() {
|
||||
LOGL("PortSettingsChanged: port settings changed complete");
|
||||
// finish port setting changed.
|
||||
|
@ -298,7 +298,9 @@ bool OmxPromiseLayer::Event(OMX_EVENTTYPE aEvent, OMX_U32 aData1,
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { return false; }
|
||||
default: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ class MFTDecoder final {
|
||||
// - aOutputType needs at least major and minor types set.
|
||||
// This is used to select the matching output type out
|
||||
// of all the available output types of the MFT.
|
||||
HRESULT SetMediaTypes(IMFMediaType* aInputType, IMFMediaType* aOutputType,
|
||||
HRESULT SetMediaTypes(
|
||||
IMFMediaType* aInputType, IMFMediaType* aOutputType,
|
||||
std::function<HRESULT(IMFMediaType*)>&& aCallback =
|
||||
[](IMFMediaType* aOutput) { return S_OK; });
|
||||
|
||||
|
@ -475,7 +475,8 @@ MediaResult MediaChangeMonitor::CreateDecoderAndInit(MediaRawData* aSample) {
|
||||
RefPtr<MediaChangeMonitor> self = this;
|
||||
RefPtr<MediaRawData> sample = aSample;
|
||||
mDecoder->Init()
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self, sample, this](const TrackType aTrackType) {
|
||||
mInitPromiseRequest.Complete();
|
||||
mConversionRequired = Some(mDecoder->NeedsConversion());
|
||||
@ -544,7 +545,8 @@ void MediaChangeMonitor::DecodeFirstSample(MediaRawData* aSample) {
|
||||
|
||||
RefPtr<MediaChangeMonitor> self = this;
|
||||
mDecoder->Decode(aSample)
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self, this](MediaDataDecoder::DecodedData&& aResults) {
|
||||
mDecodePromiseRequest.Complete();
|
||||
mPendingFrames.AppendElements(std::move(aResults));
|
||||
@ -589,7 +591,8 @@ void MediaChangeMonitor::DrainThenFlushDecoder(MediaRawData* aPendingSample) {
|
||||
RefPtr<MediaRawData> sample = aPendingSample;
|
||||
RefPtr<MediaChangeMonitor> self = this;
|
||||
mDecoder->Drain()
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self, sample, this](MediaDataDecoder::DecodedData&& aResults) {
|
||||
mDrainRequest.Complete();
|
||||
if (!mFlushPromise.IsEmpty()) {
|
||||
@ -625,7 +628,8 @@ void MediaChangeMonitor::FlushThenShutdownDecoder(
|
||||
RefPtr<MediaRawData> sample = aPendingSample;
|
||||
RefPtr<MediaChangeMonitor> self = this;
|
||||
mDecoder->Flush()
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self, sample, this]() {
|
||||
mFlushRequest.Complete();
|
||||
|
||||
@ -637,7 +641,8 @@ void MediaChangeMonitor::FlushThenShutdownDecoder(
|
||||
|
||||
mShutdownPromise = ShutdownDecoder();
|
||||
mShutdownPromise
|
||||
->Then(mTaskQueue, __func__,
|
||||
->Then(
|
||||
mTaskQueue, __func__,
|
||||
[self, sample, this]() {
|
||||
mShutdownRequest.Complete();
|
||||
mShutdownPromise = nullptr;
|
||||
|
@ -224,7 +224,8 @@ Await(already_AddRefed<nsIEventTarget> aPool,
|
||||
|
||||
typename MozPromise<ResolveValueType, RejectValueType,
|
||||
Excl>::ResolveOrRejectValue val;
|
||||
aPromise->Then(taskQueue, __func__,
|
||||
aPromise->Then(
|
||||
taskQueue, __func__,
|
||||
[&](ResolveValueType aResolveValue) {
|
||||
val.SetResolve(std::move(aResolveValue));
|
||||
MonitorAutoLock lock(mon);
|
||||
|
@ -107,18 +107,18 @@ class DenormalDisabler {
|
||||
inline int getStatusWord() {
|
||||
int result;
|
||||
# if defined(__aarch64__)
|
||||
asm volatile("mrs %x[result], FPCR" : [result] "=r"(result));
|
||||
asm volatile("mrs %x[result], FPCR" : [ result ] "=r"(result));
|
||||
# else
|
||||
asm volatile("vmrs %[result], FPSCR" : [result] "=r"(result));
|
||||
asm volatile("vmrs %[result], FPSCR" : [ result ] "=r"(result));
|
||||
# endif
|
||||
return result;
|
||||
}
|
||||
|
||||
inline void setStatusWord(int a) {
|
||||
# if defined(__aarch64__)
|
||||
asm volatile("msr FPCR, %x[src]" : : [src] "r"(a));
|
||||
asm volatile("msr FPCR, %x[src]" : : [ src ] "r"(a));
|
||||
# else
|
||||
asm volatile("vmsr FPSCR, %[src]" : : [src] "r"(a));
|
||||
asm volatile("vmsr FPSCR, %[src]" : : [ src ] "r"(a));
|
||||
# endif
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,9 @@ int MediaEngineRemoteVideoSource::DeliverFrame(
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rtc::Callback0<void> callback_unused;
|
||||
|
@ -679,7 +679,8 @@ void SpeechRecognition::Start(const Optional<NonNull<DOMMediaStream>>& aStream,
|
||||
RefPtr<SpeechRecognition> self(this);
|
||||
MediaManager::Get()
|
||||
->GetUserMedia(GetOwner(), constraints, aCallerType)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, self](RefPtr<DOMMediaStream>&& aStream) {
|
||||
mStream = std::move(aStream);
|
||||
mStream->RegisterTrackListener(this);
|
||||
|
@ -268,7 +268,9 @@ PaymentShowActionResponse::Init(const nsAString& aRequestId,
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
mData = aData;
|
||||
|
@ -143,7 +143,9 @@ void PaymentMethodChangeEvent::GetMethodDetails(
|
||||
aRetVal.set(&value.toObject());
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,9 @@ void ConvertResponseData(const IPCPaymentResponseData& aIPCData,
|
||||
aData = bData;
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,7 +303,9 @@ void ConvertMethodChangeDetails(const IPCMethodChangeDetails& aIPCDetails,
|
||||
aDetails = bDetails;
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of namespace
|
||||
@ -681,7 +685,9 @@ nsresult PaymentRequestManager::RespondPayment(
|
||||
NotifyRequestDone(aRequest);
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -178,7 +178,9 @@ nsresult PaymentRequestService::LaunchUIAction(const nsAString& aRequestId,
|
||||
rv = uiService->ClosePayment(aRequestId);
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
@ -332,7 +334,9 @@ nsresult PaymentRequestService::RequestPayment(
|
||||
aRequestId, IPCPaymentActionRequest::TIPCPaymentUpdateActionRequest);
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -418,7 +422,9 @@ PaymentRequestService::RespondPayment(nsIPaymentActionResponse* aResponse) {
|
||||
mRequestQueue.RemoveElement(request);
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -66,7 +66,9 @@ mozilla::ipc::IPCResult PaymentRequestParent::RecvRequestPayment(
|
||||
mRequestId = request.requestId();
|
||||
break;
|
||||
}
|
||||
default: { return IPC_FAIL(this, "Unknown PaymentRequest action type"); }
|
||||
default: {
|
||||
return IPC_FAIL(this, "Unknown PaymentRequest action type");
|
||||
}
|
||||
}
|
||||
nsCOMPtr<nsIPaymentRequestService> service =
|
||||
do_GetService(NS_PAYMENT_REQUEST_SERVICE_CONTRACT_ID);
|
||||
@ -176,7 +178,9 @@ nsresult PaymentRequestParent::RespondPayment(
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -310,7 +314,9 @@ nsresult PaymentRequestParent::ChangePaymentMethod(
|
||||
ipcChangeDetails = ipcBasicCardDetails;
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!SendChangePaymentMethod(requestId, methodName, ipcChangeDetails)) {
|
||||
@ -454,7 +460,9 @@ nsresult PaymentRequestParent::SerializeResponseData(
|
||||
aIPCData = data;
|
||||
break;
|
||||
}
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -5602,7 +5602,9 @@ bool QuotaManager::IsPrincipalInfoValid(const PrincipalInfo& aPrincipalInfo) {
|
||||
return true;
|
||||
}
|
||||
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Null and expanded principals are not acceptable.
|
||||
@ -5643,7 +5645,9 @@ void QuotaManager::GetInfoFromValidatedPrincipalInfo(
|
||||
return;
|
||||
}
|
||||
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_CRASH("Should never get here!");
|
||||
@ -8237,7 +8241,9 @@ bool PrincipalVerifier::IsPrincipalInfoValid(
|
||||
return true;
|
||||
}
|
||||
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Null and expanded principals are not acceptable.
|
||||
|
@ -54,7 +54,8 @@ void ServiceWorkerContainerImpl::Register(
|
||||
global);
|
||||
|
||||
swm->Register(aClientInfo, aScopeURL, aScriptURL, aUpdateViaCache)
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const ServiceWorkerRegistrationDescriptor& aDescriptor) {
|
||||
holder->Complete();
|
||||
@ -91,7 +92,8 @@ void ServiceWorkerContainerImpl::GetRegistration(
|
||||
global);
|
||||
|
||||
swm->GetRegistration(aClientInfo, aURL)
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const ServiceWorkerRegistrationDescriptor& aDescriptor) {
|
||||
holder->Complete();
|
||||
@ -127,9 +129,10 @@ void ServiceWorkerContainerImpl::GetRegistrations(
|
||||
DOMMozPromiseRequestHolder<ServiceWorkerRegistrationListPromise>>(global);
|
||||
|
||||
swm->GetRegistrations(aClientInfo)
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB), holder](
|
||||
const nsTArray<ServiceWorkerRegistrationDescriptor>& aList) {
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const nsTArray<ServiceWorkerRegistrationDescriptor>& aList) {
|
||||
holder->Complete();
|
||||
successCB(aList);
|
||||
},
|
||||
@ -164,7 +167,8 @@ void ServiceWorkerContainerImpl::GetReady(
|
||||
global);
|
||||
|
||||
swm->WhenReady(aClientInfo)
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const ServiceWorkerRegistrationDescriptor& aDescriptor) {
|
||||
holder->Complete();
|
||||
|
@ -79,7 +79,8 @@ IPCResult ServiceWorkerContainerParent::RecvGetRegistrations(
|
||||
}
|
||||
|
||||
mProxy->GetRegistrations(ClientInfo(aClientInfo))
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[aResolver](
|
||||
const nsTArray<ServiceWorkerRegistrationDescriptor>& aList) {
|
||||
IPCServiceWorkerRegistrationDescriptorList ipcList;
|
||||
|
@ -2452,7 +2452,8 @@ void ServiceWorkerManager::UpdateClientControllers(
|
||||
|
||||
// If we fail to control the client, then automatically remove it
|
||||
// from our list of controlled clients.
|
||||
p->Then(SystemGroup::EventTargetFor(TaskCategory::Other), __func__,
|
||||
p->Then(
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other), __func__,
|
||||
[](bool) {
|
||||
// do nothing on success
|
||||
},
|
||||
|
@ -504,7 +504,8 @@ void ServiceWorkerRegistrationMainThread::Update(
|
||||
global);
|
||||
|
||||
cb->Promise()
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const ServiceWorkerRegistrationDescriptor& aDescriptor) {
|
||||
holder->Complete();
|
||||
@ -555,7 +556,8 @@ void ServiceWorkerRegistrationMainThread::Unregister(
|
||||
auto holder = MakeRefPtr<DOMMozPromiseRequestHolder<GenericPromise>>(global);
|
||||
|
||||
cb->Promise()
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB), holder](bool aResult) {
|
||||
holder->Complete();
|
||||
successCB(aResult);
|
||||
@ -769,7 +771,8 @@ void ServiceWorkerRegistrationWorkerThread::Update(
|
||||
global);
|
||||
|
||||
promise
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB),
|
||||
holder](const ServiceWorkerRegistrationDescriptor& aDescriptor) {
|
||||
holder->Complete();
|
||||
@ -824,7 +827,8 @@ void ServiceWorkerRegistrationWorkerThread::Unregister(
|
||||
auto holder = MakeRefPtr<DOMMozPromiseRequestHolder<GenericPromise>>(global);
|
||||
|
||||
promise
|
||||
->Then(global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
->Then(
|
||||
global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
[successCB = std::move(aSuccessCB), holder](bool aResult) {
|
||||
holder->Complete();
|
||||
successCB(aResult);
|
||||
|
@ -333,7 +333,8 @@ void U2FTokenManager::DoRegister(const WebAuthnMakeCredentialInfo& aInfo,
|
||||
mozilla::TimeStamp startTime = mozilla::TimeStamp::Now();
|
||||
|
||||
mTokenManagerImpl->Register(aInfo, aForceNoneAttestation)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[tid, startTime](WebAuthnMakeCredentialResult&& aResult) {
|
||||
U2FTokenManager* mgr = U2FTokenManager::Get();
|
||||
mgr->MaybeConfirmRegister(tid, aResult);
|
||||
@ -391,14 +392,15 @@ void U2FTokenManager::Sign(PWebAuthnTransactionParent* aTransactionParent,
|
||||
mozilla::TimeStamp startTime = mozilla::TimeStamp::Now();
|
||||
|
||||
mTokenManagerImpl->Sign(aTransactionInfo)
|
||||
->Then(GetCurrentThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[tid, startTime](WebAuthnGetAssertionResult&& aResult) {
|
||||
U2FTokenManager* mgr = U2FTokenManager::Get();
|
||||
mgr->MaybeConfirmSign(tid, aResult);
|
||||
Telemetry::ScalarAdd(Telemetry::ScalarID::SECURITY_WEBAUTHN_USED,
|
||||
NS_LITERAL_STRING("U2FSignFinish"), 1);
|
||||
Telemetry::AccumulateTimeDelta(
|
||||
Telemetry::WEBAUTHN_GET_ASSERTION_MS, startTime);
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::WEBAUTHN_GET_ASSERTION_MS,
|
||||
startTime);
|
||||
},
|
||||
[tid](nsresult rv) {
|
||||
MOZ_ASSERT(NS_FAILED(rv));
|
||||
|
@ -517,7 +517,8 @@ RefPtr<PerformanceInfoPromise> WorkerDebugger::ReportPerformanceInfo() {
|
||||
SystemGroup::AbstractMainThreadFor(TaskCategory::Performance);
|
||||
|
||||
return CollectMemoryInfo(top, mainThread)
|
||||
->Then(mainThread, __func__,
|
||||
->Then(
|
||||
mainThread, __func__,
|
||||
[workerRef, url, pid, perfId, windowID, duration, isTopLevel,
|
||||
items](const PerformanceMemoryInfo& aMemoryInfo) {
|
||||
return PerformanceInfoPromise::CreateAndResolve(
|
||||
|
@ -130,7 +130,9 @@ void XMLUtils::normalizePIValue(nsAString& piValue) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
piValue.Append(ch);
|
||||
prevCh = ch;
|
||||
|
@ -165,7 +165,9 @@ nsresult XPathResult::SetExprResult(txAExprResult* aExprResult,
|
||||
mResult->stringValue(mStringResult);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT(isNode() || isIterator() || isSnapshot()); }
|
||||
default: {
|
||||
MOZ_ASSERT(isNode() || isIterator() || isSnapshot());
|
||||
}
|
||||
}
|
||||
|
||||
if (aExprResult->getResultType() == txAExprResult::NODESET) {
|
||||
|
@ -187,7 +187,9 @@ nsresult txCoreFunctionCall::evaluate(txIEvalContext* aContext,
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
default: { MOZ_CRASH("Unexpected mType?!"); }
|
||||
default: {
|
||||
MOZ_CRASH("Unexpected mType?!");
|
||||
}
|
||||
}
|
||||
MOZ_CRASH("Inner mType switch should have returned!");
|
||||
}
|
||||
|
@ -122,7 +122,9 @@ bool RelationalExpr::compareResults(txIEvalContext* aContext,
|
||||
case GREATER_OR_EQUAL: {
|
||||
return (leftDbl >= rightDbl);
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("We should have caught all cases"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("We should have caught all cases");
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -56,7 +56,9 @@ void txResultRecycler::recycle(txAExprResult* aResult) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
default: { delete aResult; }
|
||||
default: {
|
||||
delete aResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,9 @@ static nsresult flushTransaction(txOutputTransaction* aTransaction,
|
||||
return aHandler->startElement(
|
||||
transaction->mPrefix, transaction->mLocalName, transaction->mNsID);
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("Unexpected transaction type"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("Unexpected transaction type");
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
@ -808,7 +808,9 @@ nsresult txMozillaXSLTProcessor::SetParameter(const nsAString& aNamespaceURI,
|
||||
break;
|
||||
}
|
||||
|
||||
default: { return NS_ERROR_FAILURE; }
|
||||
default: {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t nsId = kNameSpaceID_Unknown;
|
||||
|
@ -806,7 +806,8 @@ nsresult EditorSpellCheck::DictionaryFetched(DictionaryFetcher* aFetcher) {
|
||||
RefPtr<EditorSpellCheck> self = this;
|
||||
RefPtr<DictionaryFetcher> fetcher = aFetcher;
|
||||
mSpellChecker->SetCurrentDictionaryFromList(tryDictList)
|
||||
->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[self, fetcher]() {
|
||||
#ifdef DEBUG_DICT
|
||||
printf("***** Assigned from content preferences |%s|\n",
|
||||
|
@ -3430,7 +3430,8 @@ nsPermissionManager::WhenPermissionsAvailable(nsIPrincipal* aPrincipal,
|
||||
|
||||
RefPtr<nsIRunnable> runnable = aRunnable;
|
||||
GenericPromise::All(thread, promises)
|
||||
->Then(thread, __func__, [runnable]() { runnable->Run(); },
|
||||
->Then(
|
||||
thread, __func__, [runnable]() { runnable->Run(); },
|
||||
[]() {
|
||||
NS_WARNING(
|
||||
"nsPermissionManager permission promise rejected. We're "
|
||||
|
@ -32,8 +32,8 @@ __m128i loadUnaligned128(__m128i *p) {
|
||||
"gsldlc1 %[vl], 0x7(%[p]) \n\t"
|
||||
"gsldrc1 %[vl], 0x0(%[p]) \n\t"
|
||||
".set pop \n\t"
|
||||
: [vh] "=f"(v.h), [vl] "=f"(v.l)
|
||||
: [p] "r"(p)
|
||||
: [ vh ] "=f"(v.h), [ vl ] "=f"(v.l)
|
||||
: [ p ] "r"(p)
|
||||
: "memory");
|
||||
|
||||
return v;
|
||||
@ -56,8 +56,8 @@ __m128i Divide(__m128i aValues, __m128i aDivisor) {
|
||||
"mthc1 %[tmp], %[maskl] \n\t"
|
||||
"mov.d %[maskh], %[maskl] \n\t"
|
||||
".set pop \n\t"
|
||||
: [rah] "=f"(ra.h), [ral] "=f"(ra.l), [maskh] "=f"(mask.h),
|
||||
[maskl] "=f"(mask.l), [tmp] "=&r"(tmp));
|
||||
: [ rah ] "=f"(ra.h), [ ral ] "=f"(ra.l), [ maskh ] "=f"(mask.h),
|
||||
[ maskl ] "=f"(mask.l), [ tmp ] "=&r"(tmp));
|
||||
|
||||
asm volatile(
|
||||
".set push \n\t"
|
||||
@ -69,12 +69,12 @@ __m128i Divide(__m128i aValues, __m128i aDivisor) {
|
||||
// the result is rounded.
|
||||
_mm_paddd(t1, t1, ra) _mm_psrld(t1, t1, srl32) _mm_paddd(t2, t2, ra)
|
||||
_mm_and(t2, t2, mask) _mm_or(p4321, t1, t2) ".set pop \n\t"
|
||||
: [p4321h] "=&f"(p4321.h), [p4321l] "=&f"(p4321.l), [t1h] "=&f"(t1.h),
|
||||
[t1l] "=&f"(t1.l), [t2h] "=&f"(t2.h), [t2l] "=&f"(t2.l),
|
||||
[srl32] "=&f"(srl32), [tmp] "=&r"(tmp)
|
||||
: [rah] "f"(ra.h), [ral] "f"(ra.l), [maskh] "f"(mask.h),
|
||||
[maskl] "f"(mask.l), [avh] "f"(aValues.h), [avl] "f"(aValues.l),
|
||||
[adh] "f"(aDivisor.h), [adl] "f"(aDivisor.l));
|
||||
: [ p4321h ] "=&f"(p4321.h), [ p4321l ] "=&f"(p4321.l),
|
||||
[ t1h ] "=&f"(t1.h), [ t1l ] "=&f"(t1.l), [ t2h ] "=&f"(t2.h),
|
||||
[ t2l ] "=&f"(t2.l), [ srl32 ] "=&f"(srl32), [ tmp ] "=&r"(tmp)
|
||||
: [ rah ] "f"(ra.h), [ ral ] "f"(ra.l), [ maskh ] "f"(mask.h),
|
||||
[ maskl ] "f"(mask.l), [ avh ] "f"(aValues.h), [ avl ] "f"(aValues.l),
|
||||
[ adh ] "f"(aDivisor.h), [ adl ] "f"(aDivisor.l));
|
||||
|
||||
return p4321;
|
||||
}
|
||||
@ -89,11 +89,11 @@ __m128i BlurFourPixels(const __m128i &aTopLeft, const __m128i &aTopRight,
|
||||
".set push \n\t"
|
||||
".set arch=loongson3a \n\t" _mm_psubw(val, abr, atr)
|
||||
_mm_psubw(val, val, abl) _mm_paddw(val, val, atl) ".set pop \n\t"
|
||||
: [valh] "=&f"(values.h), [vall] "=&f"(values.l)
|
||||
: [abrh] "f"(aBottomRight.h), [abrl] "f"(aBottomRight.l),
|
||||
[atrh] "f"(aTopRight.h), [atrl] "f"(aTopRight.l),
|
||||
[ablh] "f"(aBottomLeft.h), [abll] "f"(aBottomLeft.l),
|
||||
[atlh] "f"(aTopLeft.h), [atll] "f"(aTopLeft.l));
|
||||
: [ valh ] "=&f"(values.h), [ vall ] "=&f"(values.l)
|
||||
: [ abrh ] "f"(aBottomRight.h), [ abrl ] "f"(aBottomRight.l),
|
||||
[ atrh ] "f"(aTopRight.h), [ atrl ] "f"(aTopRight.l),
|
||||
[ ablh ] "f"(aBottomLeft.h), [ abll ] "f"(aBottomLeft.l),
|
||||
[ atlh ] "f"(aTopLeft.h), [ atll ] "f"(aTopLeft.l));
|
||||
|
||||
return Divide(values, aDivisor);
|
||||
}
|
||||
@ -203,8 +203,8 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"mtc1 %[tmp], %[see] \n\t"
|
||||
"li %[tmp], 0x44 \n\t"
|
||||
"mtc1 %[tmp], %[s44] \n\t" _mm_xor(zero, zero, zero) ".set pop \n\t"
|
||||
: [tmp] "=&r"(tmp), [s44] "=f"(s44), [see] "=f"(see),
|
||||
[zeroh] "=f"(zero.h), [zerol] "=f"(zero.l));
|
||||
: [ tmp ] "=&r"(tmp), [ s44 ] "=f"(s44), [ see ] "=f"(see),
|
||||
[ zeroh ] "=f"(zero.h), [ zerol ] "=f"(zero.l));
|
||||
for (int y = aTopInflation + 1; y < (aSize.height + aTopInflation); y++) {
|
||||
__m128i currentRowSum;
|
||||
uint32_t *intRow = aIntegralImage + (y * stride32bit);
|
||||
@ -215,7 +215,7 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
asm volatile(
|
||||
".set push \n\t"
|
||||
".set arch=loongson3a \n\t" _mm_xor(cr, cr, cr) ".set pop \n\t"
|
||||
: [crh] "=f"(currentRowSum.h), [crl] "=f"(currentRowSum.l));
|
||||
: [ crh ] "=f"(currentRowSum.h), [ crl ] "=f"(currentRowSum.l));
|
||||
for (int x = 0; x < aLeftInflation; x += 4) {
|
||||
__m128i sumPixels, t;
|
||||
asm volatile(
|
||||
@ -227,8 +227,8 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"pshufh %[sph], %[spl], %[s44] \n\t"
|
||||
"pshufh %[spl], %[spl], %[s44] \n\t"
|
||||
".set pop \n\t"
|
||||
: [sph] "=&f"(sumPixels.h), [spl] "=&f"(sumPixels.l)
|
||||
: [pix] "r"(pixel), [s44] "f"(s44));
|
||||
: [ sph ] "=&f"(sumPixels.h), [ spl ] "=&f"(sumPixels.l)
|
||||
: [ pix ] "r"(pixel), [ s44 ] "f"(s44));
|
||||
sumPixels = AccumulatePixelSums(sumPixels);
|
||||
asm volatile (
|
||||
".set push \n\t"
|
||||
@ -264,10 +264,10 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"punpcklwd %[spl], %[spl], %[spl] \n\t"
|
||||
"mov.d %[sph], %[spl] \n\t" _mm_punpcklbh(sp, sp, zero)
|
||||
_mm_punpcklhw(sp, sp, zero) ".set pop \n\t"
|
||||
: [sph] "=&f"(sumPixels.h), [spl] "=&f"(sumPixels.l),
|
||||
[crh] "+f"(currentRowSum.h), [crl] "+f"(currentRowSum.l)
|
||||
: [pix] "r"(pixels), [see] "f"(see), [zeroh] "f"(zero.h),
|
||||
[zerol] "f"(zero.l));
|
||||
: [ sph ] "=&f"(sumPixels.h), [ spl ] "=&f"(sumPixels.l),
|
||||
[ crh ] "+f"(currentRowSum.h), [ crl ] "+f"(currentRowSum.l)
|
||||
: [ pix ] "r"(pixels), [ see ] "f"(see), [ zeroh ] "f"(zero.h),
|
||||
[ zerol ] "f"(zero.l));
|
||||
sumPixels = AccumulatePixelSums(sumPixels);
|
||||
asm volatile (
|
||||
".set push \n\t"
|
||||
@ -305,8 +305,8 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"punpcklwd %[crl], %[crl], %[crl] \n\t"
|
||||
"mov.d %[crh], %[crl] \n\t"
|
||||
".set pop \n\t"
|
||||
: [crh] "=f"(currentRowSum.h), [crl] "=f"(currentRowSum.l)
|
||||
: [cr] "r"(intCurrentRowSum));
|
||||
: [ crh ] "=f"(currentRowSum.h), [ crl ] "=f"(currentRowSum.l)
|
||||
: [ cr ] "r"(intCurrentRowSum));
|
||||
break;
|
||||
}
|
||||
intCurrentRowSum += pixel;
|
||||
@ -319,8 +319,8 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"pshufh %[crl], %[crh], %[see] \n\t"
|
||||
"pshufh %[crh], %[crh], %[see] \n\t"
|
||||
".set pop \n\t"
|
||||
: [crh] "+f"(currentRowSum.h), [crl] "+f"(currentRowSum.l)
|
||||
: [see] "f"(see));
|
||||
: [ crh ] "+f"(currentRowSum.h), [ crl ] "+f"(currentRowSum.l)
|
||||
: [ see ] "f"(see));
|
||||
}
|
||||
for (; x < integralImageSize.width; x += 4) {
|
||||
__m128i sumPixels, t;
|
||||
@ -331,8 +331,8 @@ void GenerateIntegralImage_LS3(int32_t aLeftInflation, int32_t aRightInflation,
|
||||
"punpcklwd %[spl], %[spl], %[spl] \n\t"
|
||||
"mov.d %[sph], %[spl] \n\t"
|
||||
".set pop \n\t"
|
||||
: [sph] "=f"(sumPixels.h), [spl] "=f"(sumPixels.l)
|
||||
: [pix] "r"(pixel));
|
||||
: [ sph ] "=f"(sumPixels.h), [ spl ] "=f"(sumPixels.l)
|
||||
: [ pix ] "r"(pixel));
|
||||
sumPixels = AccumulatePixelSums(sumPixels);
|
||||
asm volatile (
|
||||
".set push \n\t"
|
||||
@ -432,9 +432,9 @@ void AlphaBoxBlur::BoxBlur_LS3(uint8_t *aData, int32_t aLeftLobe,
|
||||
"mtc1 %[rec], %[divl] \n\t"
|
||||
"punpcklwd %[divl], %[divl], %[divl] \n\t"
|
||||
"mov.d %[divh], %[divl] \n\t" _mm_xor(zero, zero, zero) ".set pop \n\t"
|
||||
: [divh] "=f"(divisor.h), [divl] "=f"(divisor.l), [zeroh] "=f"(zero.h),
|
||||
[zerol] "=f"(zero.l)
|
||||
: [rec] "r"(reciprocal));
|
||||
: [ divh ] "=f"(divisor.h), [ divl ] "=f"(divisor.l),
|
||||
[ zeroh ] "=f"(zero.h), [ zerol ] "=f"(zero.l)
|
||||
: [ rec ] "r"(reciprocal));
|
||||
|
||||
// This points to the start of the rectangle within the IntegralImage that
|
||||
// overlaps the surface being blurred.
|
||||
|
@ -328,7 +328,9 @@ void ReadPixelsIntoDataSurface(GLContext* gl, DataSourceSurface* dest) {
|
||||
readFormatGFX = SurfaceFormat::R5G6B5_UINT16;
|
||||
break;
|
||||
}
|
||||
default: { MOZ_CRASH("GFX: Bad read format, read format."); }
|
||||
default: {
|
||||
MOZ_CRASH("GFX: Bad read format, read format.");
|
||||
}
|
||||
}
|
||||
|
||||
switch (readType) {
|
||||
@ -347,7 +349,9 @@ void ReadPixelsIntoDataSurface(GLContext* gl, DataSourceSurface* dest) {
|
||||
readAlignment = 2;
|
||||
break;
|
||||
}
|
||||
default: { MOZ_CRASH("GFX: Bad read type, read type."); }
|
||||
default: {
|
||||
MOZ_CRASH("GFX: Bad read type, read type.");
|
||||
}
|
||||
}
|
||||
|
||||
int32_t stride = dest->GetSize().width * BytesPerPixel(readFormatGFX);
|
||||
|
@ -108,7 +108,9 @@ template <int LogLevel>
|
||||
gfx::Log<LogLevel>& operator<<(gfx::Log<LogLevel>& log,
|
||||
const ScrollableLayerGuid& aGuid) {
|
||||
return log << nsPrintfCString("(0x%" PRIx64 ", %u, %" PRIu64 ")",
|
||||
uint64_t(aGuid.mLayersId), aGuid.mPresShellId, aGuid.mScrollId).get();
|
||||
uint64_t(aGuid.mLayersId), aGuid.mPresShellId,
|
||||
aGuid.mScrollId)
|
||||
.get();
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
|
@ -185,7 +185,8 @@ template <typename Iterator, typename Node, typename PostAction>
|
||||
auto ForEachNodePostOrder(Node aRoot, const PostAction& aPostAction) ->
|
||||
typename EnableIf<IsSame<decltype(aPostAction(aRoot)), void>::value,
|
||||
void>::Type {
|
||||
ForEachNode<Iterator>(aRoot, [](Node aNode) {}, aPostAction);
|
||||
ForEachNode<Iterator>(
|
||||
aRoot, [](Node aNode) {}, aPostAction);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -740,7 +740,9 @@ static bool IsCompatibleTextureSource(TextureSource* aTexture,
|
||||
return aTexture->GetFormat() == rgb.format() &&
|
||||
aTexture->GetSize() == rgb.size();
|
||||
}
|
||||
default: { return false; }
|
||||
default: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -728,7 +728,9 @@ already_AddRefed<TextureHost> CreateTextureHostD3D11(
|
||||
aFlags, aDesc.get_SurfaceDescriptorDXGIYCbCr());
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("Unsupported SurfaceDescriptor type"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("Unsupported SurfaceDescriptor type");
|
||||
}
|
||||
}
|
||||
return result.forget();
|
||||
}
|
||||
@ -1044,7 +1046,9 @@ void DXGITextureHostD3D11::PushResourceUpdates(
|
||||
(aResources.*method)(aImageKeys[1], descriptor1, aExtID, bufferType, 1);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1079,7 +1083,9 @@ void DXGITextureHostD3D11::PushDisplayItems(
|
||||
aFilter);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,9 @@ bool CompositableParentManager::ReceiveCompositableUpdate(
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT(false, "bad type"); }
|
||||
default: {
|
||||
MOZ_ASSERT(false, "bad type");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -247,7 +249,9 @@ void CompositableParentManager::DestroyActor(const OpDestroy& aOp) {
|
||||
ReleaseCompositable(aOp.get_CompositableHandle());
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT(false, "unsupported type"); }
|
||||
default: {
|
||||
MOZ_ASSERT(false, "unsupported type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,9 +204,7 @@ LayersBackend LayerManagerMLGPU::GetBackendType() {
|
||||
|
||||
void LayerManagerMLGPU::SetRoot(Layer* aLayer) { mRoot = aLayer; }
|
||||
|
||||
bool LayerManagerMLGPU::BeginTransaction(const nsCString& aURL) {
|
||||
return true;
|
||||
}
|
||||
bool LayerManagerMLGPU::BeginTransaction(const nsCString& aURL) { return true; }
|
||||
|
||||
void LayerManagerMLGPU::BeginTransactionWithDrawTarget(
|
||||
gfx::DrawTarget* aTarget, const gfx::IntRect& aRect) {
|
||||
|
@ -193,7 +193,9 @@ void MacIOSurfaceTextureHostOGL::PushResourceUpdates(
|
||||
(aResources.*method)(aImageKeys[1], descriptor1, aExtID, bufferType, 1);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +235,9 @@ void MacIOSurfaceTextureHostOGL::PushDisplayItems(
|
||||
aFilter);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,7 +655,9 @@ void SurfaceTextureHost::PushResourceUpdates(
|
||||
(aResources.*method)(aImageKeys[0], descriptor, aExtID, bufferType, 0);
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -673,7 +675,9 @@ void SurfaceTextureHost::PushDisplayItems(
|
||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED));
|
||||
break;
|
||||
}
|
||||
default: { MOZ_ASSERT_UNREACHABLE("unexpected to be called"); }
|
||||
default: {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user