Commit fd4832ea authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 91af3c56
...@@ -142,22 +142,33 @@ static void register_nscontainer_class(void) ...@@ -142,22 +142,33 @@ static void register_nscontainer_class(void)
nscontainer_class = RegisterClassExW(&wndclass); nscontainer_class = RegisterClassExW(&wndclass);
} }
static BOOL load_xpcom(const PRUnichar *gre_path) static void set_environment(LPCWSTR gre_path)
{ {
WCHAR path_env[MAX_PATH]; WCHAR path_env[MAX_PATH];
int len; int len;
static const WCHAR wszPATH[] = {'P','A','T','H',0}; static const WCHAR pathW[] = {'P','A','T','H',0};
static const WCHAR strXPCOM[] = {'x','p','c','o','m','.','d','l','l',0}; static const WCHAR warnW[] = {'w','a','r','n',0};
static const WCHAR xpcom_debug_breakW[] =
TRACE("(%s)\n", debugstr_w(gre_path)); {'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. */ /* 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); len = strlenW(path_env);
path_env[len++] = ';'; path_env[len++] = ';';
strcpyW(path_env+len, gre_path); 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); hXPCOM = LoadLibraryW(strXPCOM);
if(!hXPCOM) { if(!hXPCOM) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment