Bug 737022 Re-enable strict warnings when parsing XUL r=jst

This commit is contained in:
Neil Rashbrook 2012-03-22 08:36:36 +00:00
parent d638ae459b
commit 77b06e9e21

View File

@ -991,8 +991,6 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
// In debug builds, warnings are enabled in chrome context if
// javascript.options.strict.debug is true
bool strictDebug = Preferences::GetBool(js_strict_debug_option_str);
// Note this callback is also called from context's InitClasses thus we don't
// need to enable this directly from InitContext
if (strictDebug && (newDefaultJSOptions & JSOPTION_STRICT) == 0) {
if (chromeWindow)
newDefaultJSOptions |= JSOPTION_STRICT;
@ -2105,6 +2103,8 @@ nsJSContext::InitContext()
::JS_SetErrorReporter(mContext, NS_ScriptErrorReporter);
JSOptionChangedCallback(js_options_dot_str, this);
return NS_OK;
}
@ -2827,8 +2827,6 @@ nsJSContext::InitClasses(JSObject* aGlobalObj)
::JS_DefineFunctions(mContext, aGlobalObj, DMDFunctions);
#endif
JSOptionChangedCallback(js_options_dot_str, this);
return rv;
}