Checking in fix for bug 81308 which caused JS errors in XUL prototype scripts to not be shown on the console, patch by sfraser@netscape.com, sr=sfraser@netscape.com, jst@netscape.com, r=pollmann@netscape.com

This commit is contained in:
jst%netscape.com 2001-05-18 07:25:56 +00:00
Родитель 9e5fcf8552
Коммит eec197281b
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -1030,6 +1030,8 @@ nsJSContext::InitContext(nsIScriptGlobalObject *aGlobalObject)
NS_ENSURE_SUCCESS(rv, rv);
}
::JS_SetErrorReporter(mContext, NS_ScriptErrorReporter);
if (!aGlobalObject) {
// If we don't get a global object then there's nothing more to do here.
@ -1051,7 +1053,8 @@ nsJSContext::InitContext(nsIScriptGlobalObject *aGlobalObject)
rv = xpc->InitClassesWithNewWrappedGlobal(mContext, aGlobalObject,
NS_GET_IID(nsISupports),
PR_FALSE, getter_AddRefs(holder));
PR_FALSE,
getter_AddRefs(holder));
} else {
// If there's already a global object in mContext we're called
// after ::JS_ClearScope() was called. We'll haveto tell XPConnect
@ -1065,8 +1068,6 @@ nsJSContext::InitContext(nsIScriptGlobalObject *aGlobalObject)
rv = InitClasses(); // this will complete global object initialization
NS_ENSURE_SUCCESS(rv, rv);
::JS_SetErrorReporter(mContext, NS_ScriptErrorReporter);
mIsInitialized = PR_TRUE;
return rv;