Skip to content

Commit

Permalink
Cherry-pick 259548.841@safari-7615-branch (74f32c2). https://bugs.web…
Browse files Browse the repository at this point in the history
…kit.org/show_bug.cgi?id=258303

    Remove unnecessary release assertion from mixed content checker.
    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):

    Canonical link: https://commits.webkit.org/259548.841@safari-7615-branch
  • Loading branch information
rreno authored and mcatanzaro committed Jul 28, 2023
1 parent 21a661f commit 169f297
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 @@ -52,13 +52,11 @@ static bool foundMixedContentInFrameTree(const Frame& 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 169f297

Please sign in to comment.