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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditingState.h

Issue 1703903002: Editing: Remove unreasonable ASSERT_NO_EDITING_ABORT instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/core/editing/commands/EditingState.h
diff --git a/third_party/WebKit/Source/core/editing/commands/EditingState.h b/third_party/WebKit/Source/core/editing/commands/EditingState.h
index 5063e26460c330c807e3f49fa9a6ba04494ac8aa..c4da581a61370452b34c69190d8149dc0b0f9bae 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditingState.h
+++ b/third_party/WebKit/Source/core/editing/commands/EditingState.h
@@ -65,9 +65,7 @@ private:
} while (true)
#if ENABLE(ASSERT)
-// TODO(yosin): Once all commands aware |EditingState|, we get rid of
-// |NoEditingAbortChecker| class
-// This class is inspired by |NoExceptionStateAssertionChecke|.
+// This class is inspired by |NoExceptionStateAssertionChecker|.
class NoEditingAbortChecker final {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(NoEditingAbortChecker);
@@ -83,9 +81,11 @@ private:
int const m_line;
};
-// A macro for default parameter of |EditingState*| parameter.
-// TODO(yosin): Once all commands aware |EditingState|, we get rid of
-// |ASSERT_NO_EDITING_ABORT| macro.
+// If a function with EditingState* argument should not be aborted,
+// ASSERT_NO_EDITING_ABORT should be specified.
+// fooFunc(...., ASSERT_NO_EDITING_ABORT);
+// It causes an assertion failure If ENABLE(ASSERT) and the function was aborted
+// unexpectedly.
#define ASSERT_NO_EDITING_ABORT (NoEditingAbortChecker(__FILE__, __LINE__).editingState())
#else
#define ASSERT_NO_EDITING_ABORT (IgnorableEditingAbortState().editingState())

Powered by Google App Engine
This is Rietveld 408576698