mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1123966 - Use FILE_FLAG_DELETE_ON_CLOSE instead of RemoveFile. r=akloyz
This commit is contained in:
parent
1e05700331
commit
a15474f0cb
@ -85,7 +85,6 @@ typedef HANDLE (WINAPI *CreateFileWPtr)(LPCWSTR fname, DWORD access,
|
||||
DWORD creation, DWORD flags,
|
||||
HANDLE ftemplate);
|
||||
static CreateFileWPtr sCreateFileWStub = nullptr;
|
||||
static WCHAR* sReplacementConfigFile;
|
||||
|
||||
// Used with fix for flash fullscreen window loosing focus.
|
||||
static bool gDelayFlashFocusReplyUntilEval = false;
|
||||
@ -1933,10 +1932,6 @@ PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings)
|
||||
# error Please implement me for your platform
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
CleanupProtectedModeHook();
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1971,7 +1966,8 @@ CreateFileHookFn(LPCWSTR fname, DWORD access, DWORD share,
|
||||
HANDLE replacement =
|
||||
sCreateFileWStub(tempFile, GENERIC_READ | GENERIC_WRITE, share,
|
||||
security, TRUNCATE_EXISTING,
|
||||
FILE_ATTRIBUTE_TEMPORARY,
|
||||
FILE_ATTRIBUTE_TEMPORARY |
|
||||
FILE_FLAG_DELETE_ON_CLOSE,
|
||||
NULL);
|
||||
if (replacement == INVALID_HANDLE_VALUE) {
|
||||
break;
|
||||
@ -2001,7 +1997,6 @@ CreateFileHookFn(LPCWSTR fname, DWORD access, DWORD share,
|
||||
WriteFile(replacement, static_cast<const void*>(kSettingString),
|
||||
sizeof(kSettingString) - 1, &wbytes, NULL);
|
||||
SetFilePointer(replacement, 0, NULL, FILE_BEGIN);
|
||||
sReplacementConfigFile = _wcsdup(tempFile);
|
||||
return replacement;
|
||||
}
|
||||
return sCreateFileWStub(fname, access, share, security, creation, flags,
|
||||
@ -2017,16 +2012,6 @@ PluginModuleChild::HookProtectedMode()
|
||||
(void**) &sCreateFileWStub);
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChild::CleanupProtectedModeHook()
|
||||
{
|
||||
if (sReplacementConfigFile) {
|
||||
DeleteFile(sReplacementConfigFile);
|
||||
free(sReplacementConfigFile);
|
||||
sReplacementConfigFile = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
PMCGetWindowInfoHook(HWND hWnd, PWINDOWINFO pwi)
|
||||
{
|
||||
|
@ -307,7 +307,6 @@ private:
|
||||
|
||||
#if defined(OS_WIN)
|
||||
void HookProtectedMode();
|
||||
void CleanupProtectedModeHook();
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
|
Loading…
Reference in New Issue
Block a user