[webkit-reviews] review granted: [Bug 31699] Web Inspector: Should Cache Values of InspectorController.platform() and port : [Attachment 43540] [PATCH] Use getters instead of WebInspector.function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 19 20:36:24 PST 2009


Timothy Hatcher <timothy at hatcher.name> has granted Brian Weinstein
<bweinstein at apple.com>'s request for review:
Bug 31699: Web Inspector: Should Cache Values of InspectorController.platform()
and port
https://bugs.webkit.org/show_bug.cgi?id=31699

Attachment 43540: [PATCH] Use getters instead of WebInspector.function
https://bugs.webkit.org/attachment.cgi?id=43540&action=review

------- Additional Comments from Timothy Hatcher <timothy at hatcher.name>
> +	   if (!this._platform)

A better idiom we use is:

	  if (!("_platform" in this))

It is semi faster. It only checks if the property exists, not the value.

> +	   if (!this._port)

Ditto.


More information about the webkit-reviews mailing list