func:  CData::Create(JSContext* HandleObject HandleObject void* bool ownResult) jsval slot = JS_GetReservedSlot ( typeObj , SLOT_PROTO ) ; RootedObject proto ( cx , & slot . toObject ( ) ) ; RootedObject parent ( cx , JS_GetParent ( typeObj ) ) ; RootedObject dataObj ( cx , JS_NewObjectWithGivenProto ( cx , & sCDataClass , proto , parent ) ) ; if ( ! dataObj )  char * * buffer = cx -> new_ < char * > ( ) if ( ! buffer )  char * data ; if ( ! ownResult )  data = static_cast < char * > source size_t size = CType :: GetSize ( typeObj ) ;  CType::GetSize(JSObject* obj) jsval size = JS_GetReservedSlot ( obj , SLOT_SIZE ) ; if ( size . isInt32 ( ) )  return size . toInt32 ( ) ; return Convert < size_t > ( size . toDouble ( ) ) ; data = dataObj -> zone ( ) -> pod_malloc < char > ( size ); if ( ! data )  if ( ! source )  memcpy ( data , source , size ); * buffer = data; JS_SetReservedSlot ( dataObj , SLOT_DATA , PRIVATE_TO_JSVAL ( buffer ) ); 