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

Unified Diff: Source/core/editing/Editor.h

Issue 593583002: Assert that frame() derefs a non-null pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | Source/core/editing/InputMethodController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.h
diff --git a/Source/core/editing/Editor.h b/Source/core/editing/Editor.h
index a29a973e692fb99391d318093487bb7e2d2bbc1e..cb42d35c2a2b6d6d1b42ecdf10937de81dd147bc 100644
--- a/Source/core/editing/Editor.h
+++ b/Source/core/editing/Editor.h
@@ -141,7 +141,11 @@ public:
// Returns 0 if this Command is not supported.
int idForHistogram() const;
private:
- LocalFrame& frame() const { return *m_frame; }
+ LocalFrame& frame() const
+ {
+ ASSERT(m_frame);
+ return *m_frame;
+ }
const EditorInternalCommand* m_command;
EditorCommandSource m_source;
@@ -246,7 +250,11 @@ private:
explicit Editor(LocalFrame&);
- LocalFrame& frame() const { return *m_frame; }
+ LocalFrame& frame() const
+ {
+ ASSERT(m_frame);
+ return *m_frame;
+ }
bool canDeleteRange(Range*) const;
« no previous file with comments | « no previous file | Source/core/editing/InputMethodController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698