Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Issue 15390003: Use-after-free in WebCore::Range::compareBoundaryPoints (Closed)

Created:
7 years, 7 months ago by inferno
Modified:
7 years, 7 months ago
Reviewers:
eseidel, adamk, ojan
CC:
blink-reviews, eae+blinkwatch
Visibility:
Public.

Description

Fetch parentNode after toNormalizedRange() call has happened in containsNode() toNormalizedRange() call can trigger layout, there removing the last reference to parentNode. We don't need to RefPtr parentNode since later callers don't modify it. BUG=242114 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150685

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removes unneeded ref to node |n|. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
A LayoutTests/editing/selection/contains-node-crash.html View 1 chunk +18 lines, -0 lines 0 comments Download
A + LayoutTests/editing/selection/contains-node-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/page/DOMSelection.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
inferno
7 years, 7 months ago (2013-05-20 00:52:55 UTC) #1
ojan
https://codereview.chromium.org/15390003/diff/1/Source/core/page/DOMSelection.cpp File Source/core/page/DOMSelection.cpp (right): https://codereview.chromium.org/15390003/diff/1/Source/core/page/DOMSelection.cpp#newcode453 Source/core/page/DOMSelection.cpp:453: // reference to node |n|, The render tree doesn't ...
7 years, 7 months ago (2013-05-20 02:30:48 UTC) #2
inferno
On 2013/05/20 02:30:48, ojan wrote: > https://codereview.chromium.org/15390003/diff/1/Source/core/page/DOMSelection.cpp > File Source/core/page/DOMSelection.cpp (right): > > https://codereview.chromium.org/15390003/diff/1/Source/core/page/DOMSelection.cpp#newcode453 > ...
7 years, 7 months ago (2013-05-20 02:37:55 UTC) #3
inferno
In addition to last comment, here is the reason why these lines won't trigger the ...
7 years, 7 months ago (2013-05-20 02:43:26 UTC) #4
inferno
I debugged it wrong before. Node |n| was const, and it is not the one ...
7 years, 7 months ago (2013-05-20 16:41:03 UTC) #5
adamk
lgtm
7 years, 7 months ago (2013-05-20 17:41:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/inferno@chromium.org/15390003/9001
7 years, 7 months ago (2013-05-20 17:41:46 UTC) #7
commit-bot: I haz the power
7 years, 7 months ago (2013-05-20 18:43:24 UTC) #8
Message was sent while issue was closed.
Change committed as 150685

Powered by Google App Engine
This is Rietveld 408576698