[Webkit-unassigned] [Bug 187167] [WinCairo] WebKit MiniBrowser crashes when attempting to navigate to certain URLs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 28 22:41:31 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187167

--- Comment #3 from Christopher Reid <chris.reid at sony.com> ---
(In reply to Fujii Hironori from comment #2)
> Comment on attachment 343887 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=343887&action=review
> 
> I'm not a reviewer. This is an informal review.
> 
> > Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:48
> > +std::vector<char> toUtf8(const wchar_t* src, size_t srcLength)
> 
> Why do you want to use std::vector<char> for utf-8 strings?

This function was copying the buffer to a std::string just for callers to call c_str() on the returned string.
I wanted to use std::vector here as that copy didn't seem needed.

> > Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:233
> > +    SetWindowText(thisWindow.m_urlBarWnd, urlString.data());
> 
> Why did you replace c_str with data? Windows API expects a null-terminated
> string.

Oops right, those ones shouldn't have been changed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180629/4821cd36/attachment.html>


More information about the webkit-unassigned mailing list