[webkit-reviews] review granted: [Bug 19159] Inspector should support console.time/console.timeEnd : [Attachment 21978] Fixed bug.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 27 22:42:43 PDT 2008

Darin Adler <darin at apple.com> has granted Keishi Hattori
<casey.hattori at gmail.com>'s request for review:
Bug 19159: Inspector should support console.time/console.timeEnd

Attachment 21978: Fixed bug.

------- Additional Comments from Darin Adler <darin at apple.com>
This looks good.

For this here, there's a more efficient, but less good looking way to do it:

+    if (!m_times.contains(title))
+	 return false;
+    double startTime = m_times.take(title);

Instead you can do:

    HashMap<String, double>::iterator it = m_times.find(title);
    if (it == m_times.end())
	return false;

    double startTime = it->second;

The more complicated version does only one hash table lookup and so is more

r=me as-is

More information about the webkit-reviews mailing list