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

Unified Diff: third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h

Issue 2904123003: [DMC #21] Add check to make TextMatchMarker cast safer (Closed)
Patch Set: Remove dep 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/markers/TextMatchMarker.h
diff --git a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
index b7025f55875c58fbd3e84aa20bf0c5eff44d21aa..f5501f5e834da0964a31e05f0784fecab4926aee 100644
--- a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
@@ -75,7 +75,11 @@ class TextMatchMarker final : public DocumentMarker {
State state_;
};
-DEFINE_TYPE_CASTS(TextMatchMarker, DocumentMarker, marker, true, true);
+DEFINE_TYPE_CASTS(TextMatchMarker,
+ DocumentMarker,
+ marker,
+ marker->GetType() == DocumentMarker::kTextMatch,
+ marker.GetType() == DocumentMarker::kTextMatch);
} // namespace blink
« 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