Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3eb27b72430fa7f8a4c9e8f0743de665e6ae1f73
https://github.com/WebKit/WebKit/commit/3eb27b72430fa7f8a4c9e8f0743de665e6ae1f73
Author: Frédéric Wang <[email protected]>
Date: 2026-02-09 (Mon, 09 Feb 2026)
Changed paths:
A LayoutTests/fast/dom/rangeDeleteContents-crash-expected.txt
A LayoutTests/fast/dom/rangeDeleteContents-crash.html
M Source/WebCore/dom/Range.cpp
Log Message:
-----------
processContentsBetweenOffsets: reduce scope of checked pointer
https://bugs.webkit.org/show_bug.cgi?id=307338
Reviewed by Ryosuke Niwa.
After 306021@main introduced smart pointers in processContentsBetweenOffsets,
it's possible to hit an assertion when the checked pointer in
processContentsBetweenOffsets() goes out of scope at the end
of the function. Since this variable is only needed briefly, it's better
to reduce its scope as later calls in that method might delete the underlying
object.
Test: fast/dom/rangeDeleteContents-crash.html
* LayoutTests/fast/dom/rangeDeleteContents-crash-expected.txt: Added.
* LayoutTests/fast/dom/rangeDeleteContents-crash.html: Added.
* Source/WebCore/dom/Range.cpp:
(WebCore::processContentsBetweenOffsets): Reduce scope of n.
Canonical link: https://commits.webkit.org/307116@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications