Skip to content

Commit

Permalink
Remove unnecessary release assertion from mixed content checker.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258303
<rdar://110766912>

Reviewed by Brent Fulgham.

We now check the entire frame tree for mixed content checks for all
resources loads. An assertion that a document has a frame is no
longer valid in general. This assertion was originally added in
215749@main in an attempt to cover an untestable case. This replaces
the assert with a null check.

* Source/WebCore/loader/MixedContentChecker.cpp:
(WebCore::foundMixedContentInFrameTree):

Originally-landed-as: 259548.841@safari-7615-branch (74f32c2). rdar://113285455
Canonical link: https://commits.webkit.org/266682@main
  • Loading branch information
rreno authored and JonWBedard committed Aug 8, 2023
1 parent 0902da8 commit 92815d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/WebCore/loader/MixedContentChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ static bool foundMixedContentInFrameTree(const LocalFrame& frame, const URL& url
auto* document = frame.document();

while (document) {
RELEASE_ASSERT_WITH_MESSAGE(document->frame(), "An unparented document tried to load or run content with url: %s", url.string().utf8().data());

if (isMixedContent(*document, url))
return true;

auto* frame = document->frame();
if (frame->isMainFrame())
if (!frame || frame->isMainFrame())
break;

auto* abstractParentFrame = frame->tree().parent();
Expand Down

0 comments on commit 92815d0

Please sign in to comment.