-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-pseudo] Check the marker argument in ListMarker methods
The ListMarker class contains common logic for LayoutNGOutsideListMarker and LayoutNGInsideListMarker. But it's not a superclass, since multiple inheritance would be slow. Instead, the layout marker classes have a ListMarker member. But the ListMarker methods need to reference back their LayoutObject owner, this could have been done with a pointer, but it would take more memory. Instead, the ListMarker methods accept a LayoutObject& parameter, which is supposed to be the marker that owns that ListMarker instance. The problem was that there was no check that the LayoutObject argument was actually the owner of that ListMarker, or even that it was a marker. So if by mistake some caller passes another LayoutObject, something will go wrong but it may go unnoticed, or the cause of the misbehavior may not be obvious. This patch adds some DCHECKs to address this. Bug: 457718 Change-Id: I6cd34fceaf763f8d8ce8032c288a8066eaf90a54 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218311 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Koji Ishii <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#773059} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 92704098d48f09be36674bdb811e392d77b3d685
- Loading branch information
1 parent
aad4de9
commit b0e208c
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters