[webkit-reviews] review granted: [Bug 120611] Cut down on double hashing and code needlessly using hash table iterators : [Attachment 210314] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 2 17:17:39 PDT 2013


Andreas Kling <akling at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 120611: Cut down on double hashing and code needlessly using hash table
iterators
https://bugs.webkit.org/show_bug.cgi?id=120611

Attachment 210314: Patch
https://bugs.webkit.org/attachment.cgi?id=210314&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=210314&action=review


These all look good.

> Source/WebCore/bridge/NP_jsobject.cpp:74
> +	   ASSERT(m_map.contains(rootObject));
> +	   m_map.remove(rootObject);

It would be cool if we could think of a better pattern that would let us avoid
the contains() in debug builds.

> Source/WebCore/inspector/InspectorProfilerAgent.cpp:318
>      if (type == CPUProfileType) {
> -	   if (m_profiles.contains(uid))
> -	       m_profiles.remove(uid);
> +	   m_profiles.remove(uid);
>      } else if (type == HeapProfileType) {
> -	   if (m_snapshots.contains(uid))
> -	       m_snapshots.remove(uid);
> +	   m_snapshots.remove(uid);
>      }

Looks like we don't need curly braces here anymore.


More information about the webkit-reviews mailing list