[webkit-reviews] review granted: [Bug 27381] WinLauncher Crash with File URLs : [Attachment 32960] Correct BSTR mishandling.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 17 11:34:10 PDT 2009
Adam Roben (aroben) <aroben at apple.com> has granted Brent Fulgham
<bfulgham at webkit.org>'s request for review:
Bug 27381: WinLauncher Crash with File URLs
https://bugs.webkit.org/show_bug.cgi?id=27381
Attachment 32960: Correct BSTR mishandling.
https://bugs.webkit.org/attachment.cgi?id=32960&action=review
------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
> if (SUCCEEDED(UrlCreateFromPath(urlBStr, fileURL, &fileURLLength,
0)))
> - urlBStr = fileURL;
> + SysReAllocString(&urlBStr, fileURL);
It doesn't seem so great to be modifying the urlBStr parameter like this. Maybe
it would be better to put the file: URL into a separate variable? Something
like:
BSTR fileURLBstr = 0;
if (...) {
fileURLBstr = SysAllocString(...);
urlBStr = fileURLBstr;
}
...actual loading calls here...
if (fileURLBstr)
SysFreeString(fileURLBstr);
But it seems OK as-is.
More information about the webkit-reviews
mailing list