Jacek Caban : mshtml: Set XPCOM_DEBUG_BREAK to 'warn' before loading Gecko.

Alexandre Julliard julliard at winehq.org
Wed Dec 31 07:45:04 CST 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Dec 30 21:21:18 2008 +0100

mshtml: Set XPCOM_DEBUG_BREAK to 'warn' before loading Gecko.

---

 dlls/mshtml/nsembed.c |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 1a09587..648f8ba 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -142,22 +142,33 @@ static void register_nscontainer_class(void)
     nscontainer_class = RegisterClassExW(&wndclass);
 }
 
-static BOOL load_xpcom(const PRUnichar *gre_path)
+static void set_environment(LPCWSTR gre_path)
 {
     WCHAR path_env[MAX_PATH];
     int len;
 
-    static const WCHAR wszPATH[] = {'P','A','T','H',0};
-    static const WCHAR strXPCOM[] = {'x','p','c','o','m','.','d','l','l',0};
-
-    TRACE("(%s)\n", debugstr_w(gre_path));
+    static const WCHAR pathW[] = {'P','A','T','H',0};
+    static const WCHAR warnW[] = {'w','a','r','n',0};
+    static const WCHAR xpcom_debug_breakW[] =
+        {'X','P','C','O','M','_','D','E','B','U','G','_','B','R','E','A','K',0};
 
     /* We have to modify PATH as XPCOM loads other DLLs from this directory. */
-    GetEnvironmentVariableW(wszPATH, path_env, sizeof(path_env)/sizeof(WCHAR));
+    GetEnvironmentVariableW(pathW, path_env, sizeof(path_env)/sizeof(WCHAR));
     len = strlenW(path_env);
     path_env[len++] = ';';
     strcpyW(path_env+len, gre_path);
-    SetEnvironmentVariableW(wszPATH, path_env);
+    SetEnvironmentVariableW(pathW, path_env);
+
+    SetEnvironmentVariableW(xpcom_debug_breakW, warnW);
+}
+
+static BOOL load_xpcom(const PRUnichar *gre_path)
+{
+    static const WCHAR strXPCOM[] = {'x','p','c','o','m','.','d','l','l',0};
+
+    TRACE("(%s)\n", debugstr_w(gre_path));
+
+    set_environment(gre_path);
 
     hXPCOM = LoadLibraryW(strXPCOM);
     if(!hXPCOM) {




More information about the wine-cvs mailing list