Bug 83085

Summary: [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
Product: WebKit Reporter: Rob Buis <rwlbuis>
Component: WebKit BlackBerryAssignee: Rob Buis <rwlbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: jkjiang, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch tonikitoo: review+

Rob Buis
Reported 2012-04-03 15:57:10 PDT
In WebPage::notifyAppActivationStateChange(), suggested by Dan Bates, we should get rid of the default case to force a compiler error instead of using a runtime error: for (; it != last; ++it) { switch (activationState) { case ActivationActive: (*it)->handleAppActivatedEvent(); break; case ActivationInactive: (*it)->handleAppDeactivatedEvent(); break; case ActivationStandby: (*it)->handleAppStandbyEvent(); break; default: ASSERT(0); break; } }
Attachments
Patch (1.59 KB, patch)
2012-04-03 16:00 PDT, Rob Buis
tonikitoo: review+
Rob Buis
Comment 1 2012-04-03 16:00:56 PDT
Rob Buis
Comment 2 2012-04-04 14:54:58 PDT
Landed in r113203.
Note You need to log in before you can comment on or make changes to this bug.