| Code-Review | +1 |
if (shadow_root) {Was it possible to get here with a null `shadow_root` before? The code on the left doesn't have this and doesn't seem (?) to crash. Perhaps CHECK instead?
// A previous slot may belong to a different shadow tree than `this`, or
// `this` may not be in a shadow tree at all. Such slots are not reached
// by the traversal above; signal them here.
for (HTMLSlotElement* slot : changed_slots) {
slot->DidSlotChange(SlotChangeType::kSignalSlotChangeEvent);
}Should this go behind a kill switch, just in case?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Was it possible to get here with a null `shadow_root` before? The code on the left doesn't have this and doesn't seem (?) to crash. Perhaps CHECK instead?
Apparently so, I just added a test case which hits this null shadow_root case.
// A previous slot may belong to a different shadow tree than `this`, or
// `this` may not be in a shadow tree at all. Such slots are not reached
// by the traversal above; signal them here.
for (HTMLSlotElement* slot : changed_slots) {
slot->DidSlotChange(SlotChangeType::kSignalSlotChangeEvent);
}Should this go behind a kill switch, just in case?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |