Summary: | Clean up the occlusion handler registration / unregistration code | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Rowe (bdash) <mrowe> | ||||||
Component: | WebKit2 | Assignee: | Mark Rowe (bdash) <mrowe> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cmuppala | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Mark Rowe (bdash)
2013-04-03 14:25:36 PDT
Created attachment 196409 [details]
Patch v1
Comment on attachment 196409 [details]
Patch v1
static const OcclusionNotificationHandler occlusionNotificationHandlers[] = {
156 { WKOcclusionNotificationTypeApplicationBecameVisible, applicationBecameVisible, "Application Became Visible" },
157 { WKOcclusionNotificationTypeApplicationBecameOccluded, applicationBecameOccluded, "Application Became Occluded" },
158 { WKOcclusionNotificationTypeApplicationWindowModificationsStarted, applicationWindowModificationsStarted, "Application Window Modifications Started" },
159 { WKOcclusionNotificationTypeApplicationWindowModificationsStopped, applicationWindowModificationsStopped, "Application Window Modifications Stopped" },
160};
Minor observation: The registration of visible notification used to precede the occluded notification and the order was reversed for unregistration. Just a defensive style. Since the order is now fixed, the log line can be replaced with an ASSERT and eliminate the return statement entirely.
Created attachment 196417 [details]
Revised patch
Revised patch for reference. Removes some unnecessary consts that Darin mentioned to me, and changes the WTFLogAlways to ASSERT_WITH_MESSAGE.
|