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

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/dom/Position.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index ea5fb2b1231d2d3612b5fefeca0d43a81650db2f..974ad4e94da696efb7f4a1e43a639b90dbf2aed9 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -242,7 +242,7 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
// if document->frame() == m_frame we can get into an infinite loop
if (s.base().anchorNode()) {
Document* document = s.base().anchorNode()->document();
- if (document && document->frame() && document->frame() != m_frame && document != m_frame->document()) {
+ if (document->frame() && document->frame() != m_frame && document != m_frame->document()) {
RefPtr<Frame> guard = document->frame();
document->frame()->selection()->setSelection(s, options, align, granularity);
// It's possible that during the above set selection, this FrameSelection has been modified by
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698