Enable JS1.7 for JS XPCOM components (352748, r+sr=jst; patch from alex@crozilla.com's ZAP_20050610_BRANCH).

This commit is contained in:
brendan%mozilla.org 2006-10-06 01:07:37 +00:00
parent 3becb5b0b7
commit dc77dd29f1

View File

@ -429,6 +429,9 @@ mozJSComponentLoader::ReallyInit()
uint32 options = JS_GetOptions(mContext);
JS_SetOptions(mContext, options | JSOPTION_XML);
// enable Javascript 1.7 features (let, yield, etc. - see bug#351515)
JS_SetVersion(mContext, JSVERSION_1_7);
#ifndef XPCONNECT_STANDALONE
nsCOMPtr<nsIScriptSecurityManager> secman =
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID);