WebKit Bugzilla
Attachment 358668 Details for
Bug 193271
: [Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193271-20190109135456.patch (text/plain), 2.78 KB, created by
Fujii Hironori
on 2019-01-08 20:54:57 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-01-08 20:54:57 PST
Size:
2.78 KB
patch
obsolete
>Subversion Revision: 239762 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f21329fea6d2c2af3e1b0d42ccb8e22a24adbc23..5467253037d19d336e623da6ff437a4ba40b51b3 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-08 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR >+ https://bugs.webkit.org/show_bug.cgi?id=193271 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ BSTR is a special data structure created by SysAllocString, not a >+ wchar_t null-terminated string. >+ >+ * DumpRenderTree/win/TestRunnerWin.cpp: >+ (TestRunner::setDatabaseQuota): Use L"" instead of "" for _bstr_t. >+ * MiniBrowser/win/MiniBrowserWebHost.cpp: >+ (MiniBrowserWebHost::didFinishLoadForFrame): Use _bstr_t to create >+ BSTR from wide string literals. >+ > 2019-01-08 Dean Jackson <dino@apple.com> > > Blob references for System Previews don't get a correct file extension >diff --git a/Tools/DumpRenderTree/win/TestRunnerWin.cpp b/Tools/DumpRenderTree/win/TestRunnerWin.cpp >index bea5931416edab54dd37c3f8fa65f9982547db5d..1072532714b71f4005f8cf0c0142502454df2e4f 100644 >--- a/Tools/DumpRenderTree/win/TestRunnerWin.cpp >+++ b/Tools/DumpRenderTree/win/TestRunnerWin.cpp >@@ -448,7 +448,7 @@ void TestRunner::setDatabaseQuota(unsigned long long quota) > if (FAILED(tmpDatabaseManager->sharedWebDatabaseManager(&databaseManager))) > return; > >- databaseManager->setQuota(_bstr_t("file:///"), quota); >+ databaseManager->setQuota(_bstr_t(L"file:///"), quota); > } > > void TestRunner::goBack() >diff --git a/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp b/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp >index 7fe73246745ef9fc3c74a7d645053f2ad941f7eb..a604b8ce12f9a791d8efa609ee7a48c6ba3d2e26 100644 >--- a/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp >+++ b/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp >@@ -167,7 +167,8 @@ HRESULT MiniBrowserWebHost::didFinishLoadForFrame(_In_opt_ IWebView* webView, _I > m_client->showLastVisitedSites(*webView); > > // The following is for the test page: >- HRESULT hr = doc->getElementById(L"webkit logo", &element.GetInterfacePtr()); >+ static _bstr_t id = L"webkit logo"; >+ HRESULT hr = doc->getElementById(id, &element.GetInterfacePtr()); > if (!SUCCEEDED(hr)) > return hr; > >@@ -175,7 +176,9 @@ HRESULT MiniBrowserWebHost::didFinishLoadForFrame(_In_opt_ IWebView* webView, _I > if (!SUCCEEDED(hr)) > return hr; > >- hr = target->addEventListener(L"click", new SimpleEventListener (L"webkit logo click"), FALSE); >+ static _bstr_t eventName = L"click"; >+ static _bstr_t eventType = L"webkit logo click"; >+ hr = target->addEventListener(eventName, new SimpleEventListener(eventType), FALSE); > if (!SUCCEEDED(hr)) > return hr; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193271
:
358665
| 358668