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+

Description Rob Buis 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;
        }
    }
Comment 1 Rob Buis 2012-04-03 16:00:56 PDT
Created attachment 135443 [details]
Patch
Comment 2 Rob Buis 2012-04-04 14:54:58 PDT
Landed in r113203.