Bug 1414121. P1 - let mozDumpDebugInfo() return a promise. r=bz

MozReview-Commit-ID: Klfr3AYdSCG
This commit is contained in:
JW Wang
2017-11-03 10:33:27 +08:00
parent 5efd2bd448
commit 19c2c2d20e
3 changed files with 10 additions and 3 deletions

View File

@@ -1605,12 +1605,19 @@ HTMLMediaElement::MozRequestDebugInfo(ErrorResult& aRv)
return promise.forget();
}
void
already_AddRefed<Promise>
HTMLMediaElement::MozDumpDebugInfo()
{
ErrorResult rv;
RefPtr<Promise> promise = CreateDOMPromise(rv);
if (NS_WARN_IF(rv.Failed())) {
return nullptr;
}
if (mDecoder) {
mDecoder->DumpDebugInfo();
}
promise->MaybeResolveWithUndefined();
return promise.forget();
}
void