Bug 1414121. P2 - let MediaDecoder::DumpDebugInfo() return a MozPromise. r=jya

MozReview-Commit-ID: Fau4ysdlwwa
This commit is contained in:
JW Wang
2017-11-03 10:46:02 +08:00
parent 19c2c2d20e
commit 8f471871d2
3 changed files with 16 additions and 9 deletions

View File

@@ -1614,9 +1614,13 @@ HTMLMediaElement::MozDumpDebugInfo()
return nullptr;
}
if (mDecoder) {
mDecoder->DumpDebugInfo();
mDecoder->DumpDebugInfo()->Then(mAbstractMainThread,
__func__,
promise.get(),
&Promise::MaybeResolveWithUndefined);
} else {
promise->MaybeResolveWithUndefined();
}
promise->MaybeResolveWithUndefined();
return promise.forget();
}