Fixing bug 81928. JS errors in XUL files were not always reported. sr=brendan@mozilla.org, r=jband@netscape.com

This commit is contained in:
jst%netscape.com 2001-09-18 03:32:03 +00:00
parent 14a2d6929a
commit ac86977226

View File

@ -355,6 +355,9 @@ nsJSContext::nsJSContext(JSRuntime *aRuntime)
if (mContext) {
::JS_SetContextPrivate(mContext, (void *)this);
// Make sure the new context gets the default context options
::JS_SetOptions(mContext, mDefaultJSOptions);
// Check for the JS strict option, which enables extra error checks
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID, &rv));
if (NS_SUCCEEDED(rv)) {