I would have thought there was a bank angle sensor when bike has leaned 45 deg the ignition would be cut & if EFI the fueling would be cut. When I had my parking lot, speed bump tip over, I had the bike beyond 45 degrees and still had to hit the kill switch...of course my bike is carbureted so there probably was no sensor or mechanical fuel shutoff/engine kill switch interlock.
Of course, newer EFI, ICM and TSM/TSSM microprocessor could easily do the deed as it controls everything fueling, ignition, a/f mixture, security and signalling diagnostics (5 or 6 events is nothing for even the simplist microprocessor), given one with ongoing diagnostic mode & memory storage buffer for status info...this is an area that is intuitive as HD Electrical Troubleshooting manual does not go into the "nuts and bolts" design.