Francois Gouget : mshtml: Delete the dispex and gecko static critical sections when unloading the dll .

Alexandre Julliard julliard at winehq.org
Thu Nov 17 12:52:34 CST 2011


Module: wine
Branch: master
Commit: 113df19d6a23a0bf0f2c5744d8c818f84c0d6a9c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=113df19d6a23a0bf0f2c5744d8c818f84c0d6a9c

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Nov 17 09:52:21 2011 +0100

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 75b3f87..8a0ac44 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 12c6c15..6874459 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)




More information about the wine-cvs mailing list