Skip to content

Commit

Permalink
Cherry-pick 275113@main (53a8668). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=269829

    Remove the owner element null check in WebFrame::parentFrame()
    https://bugs.webkit.org/show_bug.cgi?id=269829
    rdar://123343035

    Reviewed by Alex Christensen.

    I tried to fix a null pointer crash in 274274@main with Site Isolation enabled but didn’t remove this
    null check. If the parent frame is being hosted in another process the owner element will always be null.

    * Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
    (WebKit::WebFrame::parentFrame const):

    Canonical link: https://commits.webkit.org/275113@main

Canonical link: https://commits.webkit.org/274313.172@webkitglib/2.44
  • Loading branch information
charliewolfe authored and aperezdc committed Apr 28, 2024
1 parent 66fe4f6 commit 1c9023f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ String WebFrame::innerText() const
RefPtr<WebFrame> WebFrame::parentFrame() const
{
RefPtr frame = m_coreFrame.get();
if (!frame || !frame->ownerElement())
if (!frame)
return nullptr;

RefPtr parentFrame = frame->tree().parent();
Expand Down

0 comments on commit 1c9023f

Please sign in to comment.