src/jdk/nashorn/internal/runtime/ScriptEnvironment.java

Print this page

        

*** 260,278 **** callSiteFlags |= NashornCallSiteDescriptor.CALLSITE_TRACE_SCOPE; } } this._callsite_flags = callSiteFlags; ! final Option<?> option = options.get("timezone"); ! if (option != null) { ! this._timezone = (TimeZone)option.getValue(); } else { this._timezone = TimeZone.getDefault(); } this._locale = Locale.getDefault(); } /** * Can we specialize a particular method name? * @param functionName method name * @return true if we are allowed to generate versions of this method --- 260,283 ---- callSiteFlags |= NashornCallSiteDescriptor.CALLSITE_TRACE_SCOPE; } } this._callsite_flags = callSiteFlags; ! final Option<?> timezoneOption = options.get("timezone"); ! if (timezoneOption != null) { ! this._timezone = (TimeZone)timezoneOption.getValue(); } else { this._timezone = TimeZone.getDefault(); } + final Option<?> localeOption = options.get("locale"); + if (localeOption != null) { + this._locale = (Locale)localeOption.getValue(); + } else { this._locale = Locale.getDefault(); } + } /** * Can we specialize a particular method name? * @param functionName method name * @return true if we are allowed to generate versions of this method