RESOLVED FIXED 53810
WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit
https://bugs.webkit.org/show_bug.cgi?id=53810
Summary WebKit2 clients fail to launch on Windows if client exe is in a different dir...
Steve Falkenburg
Reported 2011-02-04 14:02:38 PST
WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit
Attachments
Patch (3.57 KB, patch)
2011-02-04 14:07 PST, Steve Falkenburg
aroben: review+
Steve Falkenburg
Comment 1 2011-02-04 14:07:38 PST
WebKit Review Bot
Comment 2 2011-02-04 14:09:03 PST
Attachment 81284 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/win/MainWin.cpp:26: Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Roben (:aroben)
Comment 3 2011-02-04 14:18:51 PST
Comment on attachment 81284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81284&action=review > Source/WebKit2/win/MainWin.cpp:50 > + ::GetModuleFileNameW(0, webKitPath, ARRAYSIZE(webKitPath)); You could also use _countof or WTF_ARRAY_LENGTH. Maybe the latter is best, since it can be used in cross-platform code, too? > Source/WebKit2/win/MainWin.cpp:57 > + // set to 0. We want both the WebKit client app DLL path and the WebKit directory DLL path in > + // the DLL search order, and we want the current directory set to the WebKit client app path. > + ::SetDllDirectoryW(webKitPath); How does this guarantee that the "client app DLL path" is in the DLL search order, or that the current directory is set to the WebKit client app path?
Steve Falkenburg
Comment 4 2011-02-04 14:36:11 PST
Since we're using ARRAYSIZE directly within a Win32 call, it seems ok to keep. The file doesn't use any WTF headers now, so this would be the only dependency. The client app path will be in the search order, since the default use of CreateProcess sets the working directory to the same directory as the launching app. The current directory will be set to that path in the client app by Windows Explorer when it launches that app.
Steve Falkenburg
Comment 5 2011-02-04 14:37:29 PST
Build Bot
Comment 6 2011-02-04 14:56:28 PST
Note You need to log in before you can comment on or make changes to this bug.