WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
193271
[Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
https://bugs.webkit.org/show_bug.cgi?id=193271
Summary
[Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
Fujii Hironori
Reported
2019-01-08 20:26:54 PST
[Win][WebKitLegacy] wchar_t strings shouldn't be treated as BSTR BSTR | Microsoft Docs
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr
> A BSTR is a composite data type that consists of a length prefix, a data string, and a terminator.
> The following code is incorrect: > > BSTR MyBstr = L"I am a happy BSTR";
Attachments
Patch
(2.05 KB, patch)
2019-01-08 20:45 PST
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch
(2.78 KB, patch)
2019-01-08 20:54 PST
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2019-01-08 20:31:12 PST
clang-cl reports the following warnings:
> ..\..\Tools\MiniBrowser\win\MiniBrowserWebHost.cpp(170,38): warning: ISO C++11 does not allow conversion from string literal to 'BSTR' (aka 'wchar_t *') [-Wwritable-strings] > HRESULT hr = doc->getElementById(L"webkit logo", &element.GetInterfacePtr()); > ^ > ..\..\Tools\MiniBrowser\win\MiniBrowserWebHost.cpp(178,70): warning: ISO C++11 does not allow conversion from string literal to 'LPWSTR' (aka 'wchar_t *') [-Wwritable-strings] > hr = target->addEventListener(L"click", new SimpleEventListener (L"webkit logo click"), FALSE); > ^ > ..\..\Tools\MiniBrowser\win\MiniBrowserWebHost.cpp(178,35): warning: ISO C++11 does not allow conversion from string literal to 'BSTR' (aka 'wchar_t *') [-Wwritable-strings] > hr = target->addEventListener(L"click", new SimpleEventListener (L"webkit logo click"), FALSE); > ^
Fujii Hironori
Comment 2
2019-01-08 20:45:33 PST
Created
attachment 358665
[details]
Patch
Fujii Hironori
Comment 3
2019-01-08 20:54:57 PST
Created
attachment 358668
[details]
Patch
Brent Fulgham
Comment 4
2019-01-08 20:59:20 PST
Comment on
attachment 358668
[details]
Patch r=me
Fujii Hironori
Comment 5
2019-01-09 18:06:07 PST
Comment on
attachment 358668
[details]
Patch Clearing flags on attachment: 358668 Committed
r239812
: <
https://trac.webkit.org/changeset/239812
>
Fujii Hironori
Comment 6
2019-01-09 18:06:09 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2019-01-09 18:09:29 PST
<
rdar://problem/47166229
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug