Backed out changeset 6d4600975de9 (bug 1834049) for causing wpt failures in MediaStreamTrack-contentHint.html CLOSED TREE

This commit is contained in:
Cristian Tuns
2023-05-25 14:17:38 -04:00
parent 335463e095
commit bba28c5516

View File

@@ -821,6 +821,11 @@ already_AddRefed<CanvasCaptureMediaStream> HTMLCanvasElement::CaptureStream(
return nullptr;
}
if (!mCurrentContext) {
aRv.Throw(NS_ERROR_NOT_INITIALIZED);
return nullptr;
}
auto stream = MakeRefPtr<CanvasCaptureMediaStream>(window, this);
nsCOMPtr<nsIPrincipal> principal = NodePrincipal();