Bug 1333289. Part 1 - add a function to the webidl to retrieve debugging data in an asynchronous way. r=bz
MozReview-Commit-ID: AXTpOYaq56A
This commit is contained in:
@@ -1471,6 +1471,21 @@ HTMLMediaElement::GetMozDebugReaderData(nsAString& aString)
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
HTMLMediaElement::MozRequestDebugInfo(ErrorResult& aRv)
|
||||
{
|
||||
RefPtr<Promise> promise = CreateDOMPromise(aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// TODO: collect data from MDSM which must be done off the main thread.
|
||||
nsAutoString result;
|
||||
GetMozDebugReaderData(result);
|
||||
promise->MaybeResolve(result);
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
void
|
||||
HTMLMediaElement::MozDumpDebugInfo()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user