Bug 141353 - Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
Summary: Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-06 23:37 PST by Tim Horton
Modified: 2015-02-09 15:40 PST (History)
3 users (show)

See Also:


Attachments
Patch (6.13 KB, patch)
2015-02-06 23:40 PST, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

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