Bug 83085 - [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
Summary: [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateCh...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-03 15:57 PDT by Rob Buis
Modified: 2012-04-04 14:54 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2012-04-03 16:00 PDT, Rob Buis
tonikitoo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.