[webkit-reviews] review granted: [Bug 20534] DumpRenderTree needs a way to override settings on a per-test basis : [Attachment 24237] Improved possible patch to issue 20534

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 4 12:55:02 PST 2008


Adam Roben (aroben) <aroben at apple.com> has granted Glenn Wilson
<gwilson at google.com>'s request for review:
Bug 20534: DumpRenderTree needs a way to override settings on a per-test basis
https://bugs.webkit.org/show_bug.cgi?id=20534

Attachment 24237: Improved possible patch to issue 20534
https://bugs.webkit.org/attachment.cgi?id=24237&action=edit

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
> +HRESULT STDMETHODCALLTYPE WebPreferences::overridePreference(BSTR key, BSTR
value)
> +{
> +    if (!SysStringLen(key) || !SysStringLen(value))
> +	   return E_FAIL;
> +    RetainPtr<CFStringRef> keyRef(AdoptCF, CFStringCreateWithCharacters(0,
reinterpret_cast<UniChar*>(key), wcslen(key)));

We should use SysStringLen instead of wcslen when dealing with BSTRs, since it
is O(1) as opposed to O(n).

r=me even if we keep using wcslen. If you upload a new version that uses
SysStringLen I'll r+ that, too.

Thanks for all the revisions!


More information about the webkit-reviews mailing list