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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2910813002: Editor::executeCommand() should have DCEHCK about frame is active (Closed)
Patch Set: Removed line DCHECK(GetFrame().GetDocument()); Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index 50c079284ba0d35ee1fcecfb012a067cbd36529c..76b11ff233e2512e6f352404c1684ea0f2a58999 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -2855,6 +2855,7 @@ Editor::Command Editor::CreateCommand(const String& command_name,
bool Editor::ExecuteCommand(const String& command_name) {
// Specially handling commands that Editor::execCommand does not directly
// support.
+ DCHECK(GetFrame().GetDocument()->IsActive());
if (command_name == "DeleteToEndOfParagraph") {
if (!DeleteWithDirection(DeleteDirection::kForward, kParagraphBoundary,
true, false))
@@ -2891,6 +2892,7 @@ bool Editor::ExecuteCommand(const String& command_name) {
bool Editor::ExecuteCommand(const String& command_name, const String& value) {
// moveToBeginningOfDocument and moveToEndfDocument are only handled by WebKit
// for editable nodes.
+ DCHECK(GetFrame().GetDocument()->IsActive());
if (!CanEdit() && command_name == "moveToBeginningOfDocument")
return GetFrame().GetEventHandler().BubblingScroll(
kScrollUpIgnoringWritingMode, kScrollByDocument);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698