[webkit-changes] [WebKit/WebKit] a7bd57: [Win] WebCore::instanceHandle() always returns a n...
Fujii Hironori
noreply at github.com
Thu Aug 10 11:00:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a7bd570e6391a2721126dd5baa4c5251109dfdd6
https://github.com/WebKit/WebKit/commit/a7bd570e6391a2721126dd5baa4c5251109dfdd6
Author: Fujii Hironori <Hironori.Fujii at sony.com>
Date: 2023-08-10 (Thu, 10 Aug 2023)
Changed paths:
M Source/WebCore/PlatformWin.cmake
M Source/WebCore/platform/win/WebCoreInstanceHandle.cpp
M Source/WebCore/platform/win/WebCoreInstanceHandle.h
M Source/WebKit/PlatformWin.cmake
M Source/WebKit/UIProcess/Inspector/win/WebInspectorUIProxyWin.cpp
M Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp
M Source/WebKit/UIProcess/win/WebView.cpp
A Source/WebKit/win/WebKitDLL.cpp
A Source/WebKit/win/WebKitDLL.h
Log Message:
-----------
[Win] WebCore::instanceHandle() always returns a null HINSTANCE
https://bugs.webkit.org/show_bug.cgi?id=260013
Reviewed by Don Olmstead.
WebCore::instanceHandle() doesn't work as expected in Winodws WebKit2
because WebCore::setInstanceHandle is called from nowhere.
HINSTANCE is used for CreateWindow and RegisterClass. The document
<https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassa> says:
> A handle to the instance that contains the window procedure for the class.
Added DllMain for WebCore.dll and WebKit2.dll to get HINSTANCE of
them.
* Source/WebCore/PlatformWin.cmake:
* Source/WebCore/platform/win/WebCoreInstanceHandle.cpp:
(WebCore::instanceHandle):
(DllMain):
(WebCore::setInstanceHandle): Deleted.
* Source/WebCore/platform/win/WebCoreInstanceHandle.h:
* Source/WebKit/PlatformWin.cmake:
* Source/WebKit/UIProcess/Inspector/win/WebInspectorUIProxyWin.cpp:
(WebKit::WebInspectorUIProxy::registerWindowClass):
(WebKit::WebInspectorUIProxy::platformDetach):
* Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp:
* Source/WebKit/UIProcess/win/WebView.cpp:
* Source/WebKit/win/WebKitDLL.cpp: Copied from Source/WebCore/platform/win/WebCoreInstanceHandle.cpp.
(WebKit::instanceHandle):
(DllMain):
* Source/WebKit/win/WebKitDLL.h: Copied from Source/WebCore/platform/win/WebCoreInstanceHandle.h.
Canonical link: https://commits.webkit.org/266769@main
More information about the webkit-changes
mailing list