Bug 141353

Summary: Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, dino, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Description Tim Horton 2015-02-06 23:37:38 PST
Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
Comment 1 Tim Horton 2015-02-06 23:40:23 PST
Created attachment 246201 [details]
Patch
Comment 2 Anders Carlsson 2015-02-07 08:58:13 PST
Comment on attachment 246201 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246201&action=review

> Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp:-99
> -        ASSERT(m_monitors.contains(monitor->displayID()));

I'd keep this assert instead of the ASSERT_NOT_REACHED below. Might have to rewrite it to use Vector::find in case Vector doesn't have a contains member function.
Comment 3 Tim Horton 2015-02-09 15:40:21 PST
http://trac.webkit.org/changeset/179850