Attachment #8834435: v3 - Fix "shorthand" error for bug #1330006

View | Details | Raw Unified | Return to bug 1330006
Collapse All | Expand All

(-)a/js/src/builtin/Intl.js (-4 / +4 lines)
Line     Link Here 
 Lines 1579-1595   function Intl_Collator_supportedLocalesO Link Here 
1579
 * Collator internal properties.
1579
 * Collator internal properties.
1580
 *
1580
 *
1581
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 10.2.3.
1581
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 10.2.3.
1582
 */
1582
 */
1583
var collatorInternalProperties = {
1583
var collatorInternalProperties = {
1584
    sortLocaleData: collatorSortLocaleData,
1584
    sortLocaleData: collatorSortLocaleData,
1585
    searchLocaleData: collatorSearchLocaleData,
1585
    searchLocaleData: collatorSearchLocaleData,
1586
    _availableLocales: null,
1586
    _availableLocales: null,
1587
    availableLocales: function()
1587
    availableLocales: function() // eslint-disable-line object-shorthand
1588
    {
1588
    {
1589
        var locales = this._availableLocales;
1589
        var locales = this._availableLocales;
1590
        if (locales)
1590
        if (locales)
1591
            return locales;
1591
            return locales;
1592
1592
1593
        locales = intl_Collator_availableLocales();
1593
        locales = intl_Collator_availableLocales();
1594
        addSpecialMissingLanguageTags(locales);
1594
        addSpecialMissingLanguageTags(locales);
1595
        return (this._availableLocales = locales);
1595
        return (this._availableLocales = locales);
 Lines 1702-1718   function Intl_Collator_resolvedOptions() Link Here 
1702
/**
1702
/**
1703
 * NumberFormat internal properties.
1703
 * NumberFormat internal properties.
1704
 *
1704
 *
1705
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 11.2.3.
1705
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 11.2.3.
1706
 */
1706
 */
1707
var numberFormatInternalProperties = {
1707
var numberFormatInternalProperties = {
1708
    localeData: numberFormatLocaleData,
1708
    localeData: numberFormatLocaleData,
1709
    _availableLocales: null,
1709
    _availableLocales: null,
1710
    availableLocales: function()
1710
    availableLocales: function() // eslint-disable-line object-shorthand
1711
    {
1711
    {
1712
        var locales = this._availableLocales;
1712
        var locales = this._availableLocales;
1713
        if (locales)
1713
        if (locales)
1714
            return locales;
1714
            return locales;
1715
1715
1716
        locales = intl_NumberFormat_availableLocales();
1716
        locales = intl_NumberFormat_availableLocales();
1717
        addSpecialMissingLanguageTags(locales);
1717
        addSpecialMissingLanguageTags(locales);
1718
        return (this._availableLocales = locales);
1718
        return (this._availableLocales = locales);
 Lines 2693-2709   function Intl_DateTimeFormat_supportedLo Link Here 
2693
/**
2693
/**
2694
 * DateTimeFormat internal properties.
2694
 * DateTimeFormat internal properties.
2695
 *
2695
 *
2696
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 12.2.3.
2696
 * Spec: ECMAScript Internationalization API Specification, 9.1 and 12.2.3.
2697
 */
2697
 */
2698
var dateTimeFormatInternalProperties = {
2698
var dateTimeFormatInternalProperties = {
2699
    localeData: dateTimeFormatLocaleData,
2699
    localeData: dateTimeFormatLocaleData,
2700
    _availableLocales: null,
2700
    _availableLocales: null,
2701
    availableLocales: function()
2701
    availableLocales: function() // eslint-disable-line object-shorthand
2702
    {
2702
    {
2703
        var locales = this._availableLocales;
2703
        var locales = this._availableLocales;
2704
        if (locales)
2704
        if (locales)
2705
            return locales;
2705
            return locales;
2706
2706
2707
        locales = intl_DateTimeFormat_availableLocales();
2707
        locales = intl_DateTimeFormat_availableLocales();
2708
        addSpecialMissingLanguageTags(locales);
2708
        addSpecialMissingLanguageTags(locales);
2709
        return (this._availableLocales = locales);
2709
        return (this._availableLocales = locales);
 Lines 2907-2923   function resolveICUPattern(pattern, resu Link Here 
2907
2907
2908
/**
2908
/**
2909
 * PluralRules internal properties.
2909
 * PluralRules internal properties.
2910
 *
2910
 *
2911
 * Spec: ECMAScript 402 API, PluralRules, 1.3.3.
2911
 * Spec: ECMAScript 402 API, PluralRules, 1.3.3.
2912
 */
2912
 */
2913
var pluralRulesInternalProperties = {
2913
var pluralRulesInternalProperties = {
2914
    _availableLocales: null,
2914
    _availableLocales: null,
2915
    availableLocales: function()
2915
    availableLocales: function() // eslint-disable-line object-shorthand
2916
    {
2916
    {
2917
        var locales = this._availableLocales;
2917
        var locales = this._availableLocales;
2918
        if (locales)
2918
        if (locales)
2919
            return locales;
2919
            return locales;
2920
2920
2921
        locales = intl_PluralRules_availableLocales();
2921
        locales = intl_PluralRules_availableLocales();
2922
        addSpecialMissingLanguageTags(locales);
2922
        addSpecialMissingLanguageTags(locales);
2923
        return (this._availableLocales = locales);
2923
        return (this._availableLocales = locales);
(-)a/js/src/builtin/Module.js (-2 / +2 lines)
Line     Link Here 
 Lines 79-102   function ModuleResolveExport(exportName, Link Here 
79
    // Step 2
79
    // Step 2
80
    for (let i = 0; i < resolveSet.length; i++) {
80
    for (let i = 0; i < resolveSet.length; i++) {
81
        let r = resolveSet[i];
81
        let r = resolveSet[i];
82
        if (r.module === module && r.exportName === exportName)
82
        if (r.module === module && r.exportName === exportName)
83
            return null;
83
            return null;
84
    }
84
    }
85
85
86
    // Step 3
86
    // Step 3
87
    _DefineDataProperty(resolveSet, resolveSet.length, {module: module, exportName: exportName});
87
    _DefineDataProperty(resolveSet, resolveSet.length, {module, exportName});
88
88
89
    // Step 4
89
    // Step 4
90
    let localExportEntries = module.localExportEntries;
90
    let localExportEntries = module.localExportEntries;
91
    for (let i = 0; i < localExportEntries.length; i++) {
91
    for (let i = 0; i < localExportEntries.length; i++) {
92
        let e = localExportEntries[i];
92
        let e = localExportEntries[i];
93
        if (exportName === e.exportName)
93
        if (exportName === e.exportName)
94
            return {module: module, bindingName: e.localName};
94
            return {module, bindingName: e.localName};
95
    }
95
    }
96
96
97
    // Step 5
97
    // Step 5
98
    let indirectExportEntries = module.indirectExportEntries;
98
    let indirectExportEntries = module.indirectExportEntries;
99
    for (let i = 0; i < indirectExportEntries.length; i++) {
99
    for (let i = 0; i < indirectExportEntries.length; i++) {
100
        let e = indirectExportEntries[i];
100
        let e = indirectExportEntries[i];
101
        if (exportName === e.exportName) {
101
        if (exportName === e.exportName) {
102
            let importedModule = CallModuleResolveHook(module, e.moduleRequest,
102
            let importedModule = CallModuleResolveHook(module, e.moduleRequest,
(-)a/js/src/builtin/TypedObject.js (-4 / +2 lines)
Line     Link Here 
 Lines 925-941   function StorageOfTypedObject(obj) { Link Here 
925
    if (ObjectIsTransparentTypedObject(obj)) {
925
    if (ObjectIsTransparentTypedObject(obj)) {
926
      if (!TypedObjectIsAttached(obj))
926
      if (!TypedObjectIsAttached(obj))
927
          ThrowTypeError(JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
927
          ThrowTypeError(JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
928
928
929
      var descr = TypedObjectTypeDescr(obj);
929
      var descr = TypedObjectTypeDescr(obj);
930
      var byteLength = DESCR_SIZE(descr);
930
      var byteLength = DESCR_SIZE(descr);
931
931
932
      return { buffer: TypedObjectBuffer(obj),
932
      return { buffer: TypedObjectBuffer(obj),
933
               byteLength: byteLength,
933
               byteLength,
934
               byteOffset: TypedObjectByteOffset(obj) };
934
               byteOffset: TypedObjectByteOffset(obj) };
935
    }
935
    }
936
  }
936
  }
937
937
938
  ThrowTypeError(JSMSG_TYPEDOBJECT_BAD_ARGS);
938
  ThrowTypeError(JSMSG_TYPEDOBJECT_BAD_ARGS);
939
}
939
}
940
940
941
// This is the `objectType()` function defined in the spec.
941
// This is the `objectType()` function defined in the spec.
 Lines 1145-1163   function ComputeIterationSpace(arrayType Link Here 
1145
      iterationSpace[i] = grainLen;
1145
      iterationSpace[i] = grainLen;
1146
      totalLength *= grainLen;
1146
      totalLength *= grainLen;
1147
      grainType = grainType.elementType;
1147
      grainType = grainType.elementType;
1148
    } else {
1148
    } else {
1149
      // RangeError("Depth "+depth+" too high");
1149
      // RangeError("Depth "+depth+" too high");
1150
      ThrowTypeError(JSMSG_TYPEDOBJECT_BAD_ARGS);
1150
      ThrowTypeError(JSMSG_TYPEDOBJECT_BAD_ARGS);
1151
    }
1151
    }
1152
  }
1152
  }
1153
  return { iterationSpace: iterationSpace,
1153
  return { iterationSpace, grainType, totalLength };
1154
           grainType: grainType,
1155
           totalLength: totalLength };
1156
}
1154
}
1157
1155
1158
function IncrementIterationSpace(indices, iterationSpace) {
1156
function IncrementIterationSpace(indices, iterationSpace) {
1159
  // Increment something like
1157
  // Increment something like
1160
  //     [5, 5, 7, 8]
1158
  //     [5, 5, 7, 8]
1161
  // in an iteration space of
1159
  // in an iteration space of
1162
  //     [9, 9, 9, 9]
1160
  //     [9, 9, 9, 9]
1163
  // to
1161
  // to

Return to bug 1330006