Title: [239812] trunk/Tools
- Revision
- 239812
- Author
- [email protected]
- Date
- 2019-01-09 18:04:53 -0800 (Wed, 09 Jan 2019)
Log Message
[Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
https://bugs.webkit.org/show_bug.cgi?id=193271
Reviewed by Brent Fulgham.
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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (239811 => 239812)
--- trunk/Tools/ChangeLog 2019-01-10 02:03:15 UTC (rev 239811)
+++ trunk/Tools/ChangeLog 2019-01-10 02:04:53 UTC (rev 239812)
@@ -1,3 +1,19 @@
+2019-01-09 Fujii Hironori <[email protected]>
+
+ [Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
+ https://bugs.webkit.org/show_bug.cgi?id=193271
+
+ Reviewed by Brent Fulgham.
+
+ 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-09 Alexey Proskuryakov <[email protected]>
Tweak wording for build/version_check style checker error
Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (239811 => 239812)
--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2019-01-10 02:03:15 UTC (rev 239811)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2019-01-10 02:04:53 UTC (rev 239812)
@@ -448,7 +448,7 @@
if (FAILED(tmpDatabaseManager->sharedWebDatabaseManager(&databaseManager)))
return;
- databaseManager->setQuota(_bstr_t("file:///"), quota);
+ databaseManager->setQuota(_bstr_t(L"file:///"), quota);
}
void TestRunner::goBack()
Modified: trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp (239811 => 239812)
--- trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp 2019-01-10 02:03:15 UTC (rev 239811)
+++ trunk/Tools/MiniBrowser/win/MiniBrowserWebHost.cpp 2019-01-10 02:04:53 UTC (rev 239812)
@@ -167,7 +167,8 @@
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 @@
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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes