src/third_party/mozjs/extract/js/src/builtin/intl/CommonFunctions.js
/**
 * Initializes the INTL_INTERNALS_OBJECT_SLOT of the given object.
 */
Initializes the INTL_INTERNALS_OBJECT_SLOT of the given object.
Initializes the INTL_INTERNALS_OBJECT_SLOT of the given object .
function initializeIntlObject(obj, type, lazyData) {
    assert(IsObject(obj), "Non-object passed to initializeIntlObject");
    assert((type === "Collator" && intl_GuardToCollator(obj) !== null) ||
           (type === "DateTimeFormat" && intl_GuardToDateTimeFormat(obj) !== null) ||
           (type === "DisplayNames" && intl_GuardToDisplayNames(obj) !== null) ||
           (type === "ListFormat" && intl_GuardToListFormat(obj) !== null) ||
           (type === "NumberFormat" && intl_GuardToNumberFormat(obj) !== null) ||
           (type === "PluralRules" && intl_GuardToPluralRules(obj) !== null) ||
           (type === "RelativeTimeFormat" && intl_GuardToRelativeTimeFormat(obj) !== null),
           "type must match the object's class");
    assert(IsObject(lazyData), "non-object lazy data");
     The .type property indicates the type of Intl object that |obj| is. It
     must be one of:
     - Collator
     - DateTimeFormat
     - DisplayNames
     - ListFormat
     - NumberFormat
     - PluralRules
     - RelativeTimeFormat
     The .lazyData property stores information needed to compute -- without
     observable side effects -- the actual internal Intl properties of
     |obj|.  If it is non-null, then the actual internal properties haven't
     been computed, and .lazyData must be processed by
     |setInternalProperties| before internal Intl property values are
     available.  If it is null, then the .internalProps property contains an
     object whose properties are the internal Intl properties of |obj|.
    var internals = std_Object_create(null);
    internals.type = type;
    internals.lazyData = lazyData;
    internals.internalProps = null;
    assert(UnsafeGetReservedSlot(obj, INTL_INTERNALS_OBJECT_SLOT) === undefined,
           "Internal slot already initialized?");
    UnsafeSetReservedSlot(obj, INTL_INTERNALS_OBJECT_SLOT, internals);
}
function initializeIntlObject ( obj , type , lazyData ) { assert ( IsObject ( obj ) , "Non-object passed to initializeIntlObject" ) ; assert ( ( type === "Collator" && intl_GuardToCollator ( obj ) !== null ) || ( type === "DateTimeFormat" && intl_GuardToDateTimeFormat ( obj ) !== null ) || ( type === "DisplayNames" && intl_GuardToDisplayNames ( obj ) !== null ) || ( type === "ListFormat" && intl_GuardToListFormat ( obj ) !== null ) || ( type === "NumberFormat" && intl_GuardToNumberFormat ( obj ) !== null ) || ( type === "PluralRules" && intl_GuardToPluralRules ( obj ) !== null ) || ( type === "RelativeTimeFormat" && intl_GuardToRelativeTimeFormat ( obj ) !== null ) , "type must match the object's class" ) ; assert ( IsObject ( lazyData ) , "non-object lazy data" ) ; var internals = std_Object_create ( null ) ; internals . type = type ; internals . lazyData = lazyData ; internals . internalProps = null ; assert ( UnsafeGetReservedSlot ( obj , INTL_INTERNALS_OBJECT_SLOT ) === undefined , "Internal slot already initialized?" ) ; UnsafeSetReservedSlot ( obj , INTL_INTERNALS_OBJECT_SLOT , internals ) ; }
Initializes the INTL_INTERNALS_OBJECT_SLOT of the given object.
Initializes the INTL_INTERNALS_OBJECT_SLOT of the given object .
// The meaning of an internals object for an object |obj| is as follows. // // The .type property indicates the type of Intl object that |obj| is. It // must be one of: // - Collator // - DateTimeFormat // - DisplayNames // - ListFormat // - NumberFormat // - PluralRules // - RelativeTimeFormat // // The .lazyData property stores information needed to compute -- without // observable side effects -- the actual internal Intl properties of // |obj|.  If it is non-null, then the actual internal properties haven't // been computed, and .lazyData must be processed by // |setInternalProperties| before internal Intl property values are // available.  If it is null, then the .internalProps property contains an // object whose properties are the internal Intl properties of |obj|.