B2G/gecko/toolkit/components/osfile/osfile_shared_allthreads.jsm
/**
      * Abstraction above js-ctypes types.
      *
      * Use values of this type to register FFI functions. In addition to the
      * usual features of js-ctypes, values of this type perform the necessary
      * transformations to ensure that C errors are handled nicely, to connect
      * resources with their finalizer, etc.
      *
      * @param {string} name The name of the type. Must be unique.
      * @param {CType} implementation The js-ctypes implementation of the type.
      *
      * @constructor
      */
Abstraction above js-ctypes types.
Use values of this type to register FFI functions. In addition to the
usual features of js-ctypes, values of this type perform the necessary
transformations to ensure that C errors are handled nicely, to connect
resources with their finalizer, etc.

@param {string} name The name of the type. Must be unique.
@param {CType} implementation The js-ctypes implementation of the type.

@constructor
Abstraction above js - ctypes types . Use values of this type to register FFI functions . In addition to the usual features of js - ctypes values of this type perform the necessary transformations to ensure that C errors are handled nicely to connect resources with their finalizer etc . @param { string } name The name of the type . Must be unique . @param { CType } implementation The js - ctypes implementation of the type . @constructor
function Type(name, implementation) {
       if (!(typeof name == "string")) {
         throw new TypeError("Type expects as first argument a name, got: "
                             + name);
       }
       if (!(implementation instanceof ctypes.CType)) {
         throw new TypeError("Type expects as second argument a ctypes.CType"+
                             ", got: " + implementation);
       }
       Object.defineProperty(this, "name", { value: name });
       Object.defineProperty(this, "implementation", { value: implementation });
     }
function Type ( name , implementation ) { if ( ! ( typeof name == "string" ) ) { throw new TypeError ( "Type expects as first argument a name, got: " + name ) ; } if ( ! ( implementation instanceof ctypes . CType ) ) { throw new TypeError ( "Type expects as second argument a ctypes.CType" + ", got: " + implementation ) ; } Object . defineProperty ( this , "name" , { value : name } ) ; Object . defineProperty ( this , "implementation" , { value : implementation } ) ; }
Abstraction above js-ctypes types.
Abstraction above js - ctypes types .