Changeset 143233 in webkit


Ignore:
Timestamp:
Feb 18, 2013 9:19:31 AM (11 years ago)
Author:
Christophe Dumez
Message:

[Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId()
https://bugs.webkit.org/show_bug.cgi?id=110107

Reviewed by Martin Robinson.

Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId()
as HashMap::get() will already return 0 in this case anyway.

No new tests, no behavior change.

  • platform/network/soup/SocketStreamHandleSoup.cpp:

(WebCore):
(WebCore::getHandleFromId):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143232 r143233  
     12013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        [Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId()
     4        https://bugs.webkit.org/show_bug.cgi?id=110107
     5
     6        Reviewed by Martin Robinson.
     7
     8        Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId()
     9        as HashMap::get() will already return 0 in this case anyway.
     10
     11        No new tests, no behavior change.
     12
     13        * platform/network/soup/SocketStreamHandleSoup.cpp:
     14        (WebCore):
     15        (WebCore::getHandleFromId):
     16
    1172013-02-18  Zan Dobersek  <zdobersek@igalia.com>
    218
  • trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp

    r134600 r143233  
    6161// situations this way.
    6262static HashMap<void*, SocketStreamHandle*> gActiveHandles;
     63COMPILE_ASSERT(HashTraits<SocketStreamHandle*>::emptyValueIsZero, emptyMapValue_is_0);
     64
    6365static SocketStreamHandle* getHandleFromId(void* id)
    6466{
    65     if (!gActiveHandles.contains(id))
    66         return 0;
    6767    return gActiveHandles.get(id);
    6868}
Note: See TracChangeset for help on using the changeset viewer.