Skip to content

Commit

Permalink
Cherry-pick 272448.257@safari-7618-branch (23c6a88). https://bugs.web…
Browse files Browse the repository at this point in the history
…kit.org/show_bug.cgi?id=267656

    "ASAN_SEGV | WebCore::Style::resolveForDocument; WebCore::Document::styleForElementIgnoringPendingStylesheets; WebCore::Element::resolveComputedStyle"
    https://bugs.webkit.org/show_bug.cgi?id=267656
    rdar://119187152.

    Reviewed by Ryosuke Niwa.

    Need to prevent attempt to load a disconnected plugin.
    Not adding a new test case as could not make a reliable reproduction of this issue.

    * Source/WebCore/html/HTMLPlugInImageElement.cpp:
    (WebCore::HTMLPlugInImageElement::requestObject):

    Canonical link: https://commits.webkit.org/272448.257@safari-7618-branch

Canonical link: https://commits.webkit.org/266719.400@webkitglib/2.42
  • Loading branch information
nishajain61 authored and aperezdc committed Mar 14, 2024
1 parent aac6fc2 commit 9592987
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/WebCore/html/HTMLPlugInImageElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ bool HTMLPlugInImageElement::requestObject(const String& relativeURL, const Stri
return document->frame()->loader().subframeLoader().requestObject(*this, relativeURL, getNameAttribute(), mimeType, paramNames, paramValues);

document->eventLoop().queueTask(TaskSource::Networking, [this, protectedThis = Ref { *this }, document, relativeURL, nameAttribute = getNameAttribute(), mimeType, paramNames, paramValues]() mutable {
if (!isConnected())
return;
document->frame()->loader().subframeLoader().requestObject(*this, relativeURL, nameAttribute, mimeType, paramNames, paramValues);
});
return true;
Expand Down

0 comments on commit 9592987

Please sign in to comment.