Title: [143233] trunk/Source/WebCore
- Revision
- 143233
- Author
- [email protected]
- Date
- 2013-02-18 09:19:31 -0800 (Mon, 18 Feb 2013)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (143232 => 143233)
--- trunk/Source/WebCore/ChangeLog 2013-02-18 17:13:23 UTC (rev 143232)
+++ trunk/Source/WebCore/ChangeLog 2013-02-18 17:19:31 UTC (rev 143233)
@@ -1,3 +1,19 @@
+2013-02-18 Christophe Dumez <[email protected]>
+
+ [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):
+
2013-02-18 Zan Dobersek <[email protected]>
Stop placing std::isfinite and std::signbit inside the global scope
Modified: trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp (143232 => 143233)
--- trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp 2013-02-18 17:13:23 UTC (rev 143232)
+++ trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp 2013-02-18 17:19:31 UTC (rev 143233)
@@ -60,10 +60,10 @@
// we just ignore it in the callback. We avoid a lot of extra checks and tricky
// situations this way.
static HashMap<void*, SocketStreamHandle*> gActiveHandles;
+COMPILE_ASSERT(HashTraits<SocketStreamHandle*>::emptyValueIsZero, emptyMapValue_is_0);
+
static SocketStreamHandle* getHandleFromId(void* id)
{
- if (!gActiveHandles.contains(id))
- return 0;
return gActiveHandles.get(id);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes