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

Unified Diff: Source/core/editing/markup.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/editing/VisibleUnits.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index f505c5452fd357c3cfceae4ad42e0b2e2c5fdf5c..b1c18357732c091eeef0ecae133adfa93219f9ce 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -902,11 +902,7 @@ String createFullMarkup(const Node* node)
if (!node)
return String();
- Document* document = node->document();
- if (!document)
- return String();
-
- Frame* frame = document->frame();
+ Frame* frame = node->document()->frame();
if (!frame)
return String();
@@ -928,11 +924,7 @@ String createFullMarkup(const Range* range)
if (!node)
return String();
- Document* document = node->document();
- if (!document)
- return String();
-
- Frame* frame = document->frame();
+ Frame* frame = node->document()->frame();
if (!frame)
return String();
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698