Skip to content

Commit

Permalink
Bug 1850293 - Don't use IntrinsicState() in VideoFrame constructor. r…
Browse files Browse the repository at this point in the history
…=smaug

State() is cheaper, and non-virtual, and should be up-to-date. I'm
removing the concept of "intrinsic" states and this caught my eye.

Differential Revision: https://phabricator.services.mozilla.com/D187036
  • Loading branch information
emilio committed Aug 30, 2023
1 parent 306ff06 commit 6e53b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dom/media/webcodecs/VideoFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ already_AddRefed<VideoFrame> VideoFrame::Constructor(
}

// Check the usability.
if (aImageElement.IntrinsicState().HasState(ElementState::BROKEN)) {
if (aImageElement.State().HasState(ElementState::BROKEN)) {
aRv.ThrowInvalidStateError("The image's state is broken");
return nullptr;
}
Expand Down Expand Up @@ -1233,7 +1233,7 @@ already_AddRefed<VideoFrame> VideoFrame::Constructor(
}

// Check the usability.
if (aSVGImageElement.IntrinsicState().HasState(ElementState::BROKEN)) {
if (aSVGImageElement.State().HasState(ElementState::BROKEN)) {
aRv.ThrowInvalidStateError("The SVG's state is broken");
return nullptr;
}
Expand Down

0 comments on commit 6e53b39

Please sign in to comment.