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

Unified Diff: Source/core/page/DOMSelection.cpp

Issue 15390003: Use-after-free in WebCore::Range::compareBoundaryPoints (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removes unneeded ref to node |n|. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/selection/contains-node-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMSelection.cpp
diff --git a/Source/core/page/DOMSelection.cpp b/Source/core/page/DOMSelection.cpp
index ed91368b54e33510b8c38708c047c5e0a8308bde..5e34937743ca3cecffebfda72d6ddc9818624505 100644
--- a/Source/core/page/DOMSelection.cpp
+++ b/Source/core/page/DOMSelection.cpp
@@ -454,10 +454,10 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
if (!n || m_frame->document() != n->document() || selection->isNone())
return false;
- ContainerNode* parentNode = n->parentNode();
unsigned nodeIndex = n->nodeIndex();
RefPtr<Range> selectedRange = selection->selection().toNormalizedRange();
+ ContainerNode* parentNode = n->parentNode();
if (!parentNode)
return false;
« no previous file with comments | « LayoutTests/editing/selection/contains-node-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698