From 113df19d6a23a0bf0f2c5744d8c818f84c0d6a9c Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 17 Nov 2011 09:52:21 +0100 Subject: [PATCH] mshtml: Delete the dispex and gecko static critical sections when unloading the dll. --- dlls/mshtml/dispex.c | 21 +++++++++++---------- dlls/mshtml/nsembed.c | 2 ++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 75b3f8795fa..8a0ac442571 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -31,6 +31,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); +static CRITICAL_SECTION cs_dispex_static_data; +static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg = +{ + 0, 0, &cs_dispex_static_data, + { &cs_dispex_static_data_dbg.ProcessLocksList, &cs_dispex_static_data_dbg.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") } +}; +static CRITICAL_SECTION cs_dispex_static_data = { &cs_dispex_static_data_dbg, -1, 0, 0, 0, 0 }; + + static const WCHAR objectW[] = {'[','o','b','j','e','c','t',']',0}; typedef struct { @@ -155,6 +165,7 @@ void release_typelib(void) ITypeInfo_Release(typeinfos[i]); ITypeLib_Release(typelib); + DeleteCriticalSection(&cs_dispex_static_data); } HRESULT get_htmldoc_classinfo(ITypeInfo **typeinfo) @@ -320,16 +331,6 @@ HRESULT get_dispids(tid_t tid, DWORD *ret_size, DISPID **ret) return S_OK; } -static CRITICAL_SECTION cs_dispex_static_data; -static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg = -{ - 0, 0, &cs_dispex_static_data, - { &cs_dispex_static_data_dbg.ProcessLocksList, &cs_dispex_static_data_dbg.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") } -}; -static CRITICAL_SECTION cs_dispex_static_data = { &cs_dispex_static_data_dbg, -1, 0, 0, 0, 0 }; - - static dispex_data_t *get_dispex_data(DispatchEx *This) { if(This->data->data) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 12c6c15ff5c..6874459b286 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -905,6 +905,8 @@ void close_gecko(void) /* Gecko doesn't really support being unloaded */ /* if (hXPCOM) FreeLibrary(hXPCOM); */ + + DeleteCriticalSection(&cs_load_gecko); } BOOL is_gecko_path(const char *path) -- 2.11.4.GIT