Fix bug causing DCHECKs to be hit in DocumentMarkerController
These DCHECKs check that we're resetting the possibly_has_marker_types_ flag when markers_ becomes empty. Resetting this flag properly enables a performance optimization. These DCHECKs are causing sporadic crashes in debug builds; we believe this is because the markers_ map is holding weak references to its keys (Node objects), so it's possible for the map to become empty through garbage collection, which doesn't reset possibly_has_marker_types_. This CL modifies DocumentMarkerController::PossiblyHasMarkers() to catch this case. Alternatively, we could handle this case at garbage collection time, but we believe this approach has better performance characteristics. BUG=685755 Review-Url: https://codereview.chromium.org/2891843003 Cr-Commit-Position: refs/heads/master@{#473400}
Showing
Please register or sign in to comment