1# Node-API接口返回状态码介绍 2## 概述 3绝大部分Node-API接口在执行结束后,会返回一个数据类型为napi_status的状态码枚举,表示操作成功与否的相关信息。本文将重点介绍Node-API接口返回的非napi_ok的状态码详情与修复建议。 4## 各Node-API接口返回的非napi_ok状态码介绍 5<table width="1499.75" border="0" cellpadding="0" cellspacing="0" style='width:899.85pt;border-collapse:collapse;table-layout:fixed;'> 6 <col width="319" class="xl65" style='mso-width-source:userset;mso-width-alt:9332;'/> 7 <col width="259" class="xl65" style='mso-width-source:userset;mso-width-alt:7577;'/> 8 <col width="278.75" class="xl65" style='mso-width-source:userset;mso-width-alt:8155;'/> 9 <col width="317" class="xl65" style='mso-width-source:userset;mso-width-alt:9274;'/> 10 <col width="326" class="xl65" style='mso-width-source:userset;mso-width-alt:9537;'/> 11 <tr height="26" style='height:15.60pt;'> 12 <td class="xl66" height="26" width="319" style='height:15.60pt;width:191.40pt;' x:str><b>接口名称</b></td> 13 <td class="xl66" width="259" style='width:155.40pt;' x:str><b>接口功能</b></td> 14 <td class="xl67" width="278.75" style='width:167.25pt;' x:str><b>可能返回的非napi_ok状态码</b></td> 15 <td class="xl67" width="317" style='width:190.20pt;' x:str><b>原因</b></td> 16 <td class="xl67" width="326" style='width:195.60pt;' x:str><b>修复建议</b></td> 17 </tr> 18 <tr height="26" style='height:15.60pt;'> 19 <td class="xl66" height="26" style='height:15.60pt;' x:str>napi_module_register</td> 20 <td class="xl66" x:str>napi native模块注册接口。</td> 21 <td class="xl67" x:str>不涉及</td> 22 <td class="xl67" x:str>不涉及</td> 23 <td class="xl67" x:str>不涉及</td> 24 </tr> 25 <tr height="26" style='height:15.60pt;'> 26 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_last_error_info</td> 27 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取napi_extended_error_info结构体,其中包含最近一次<span style='display:none;'>出现的error信息。</span></td> 28 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 29 <td class="xl67" x:str>入参env为nullptr</td> 30 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 31 </tr> 32 <tr height="26" style='height:15.60pt;'> 33 <td class="xl67" x:str>入参result为nullptr</td> 34 </tr> 35 <tr height="26" style='height:15.60pt;'> 36 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_throw</td> 37 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>抛出一个js value。</td> 38 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 39 <td class="xl67" x:str>入参env为nullptr</td> 40 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 41 </tr> 42 <tr height="26" style='height:15.60pt;'> 43 <td class="xl67" x:str>入参error为nullptr</td> 44 </tr> 45 <tr height="26" style='height:15.60pt;'> 46 <td class="xl67" x:str>入参error不为js Error类型</td> 47 </tr> 48 <tr height="26" style='height:15.60pt;'> 49 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_throw_error</td> 50 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>抛出一个带文本信息的js Error。</td> 51 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 52 <td class="xl67" x:str>入参env为nullptr</td> 53 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 54 </tr> 55 <tr height="26" style='height:15.60pt;'> 56 <td class="xl67" x:str>入参msg为nullptr</td> 57 </tr> 58 <tr height="26" style='height:15.60pt;'> 59 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_throw_type_error</td> 60 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>抛出一个带文本信息的js TypeError。</td> 61 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 62 <td class="xl67" x:str>入参env为nullptr</td> 63 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 64 </tr> 65 <tr height="26" style='height:15.60pt;'> 66 <td class="xl67" x:str>入参msg为nullptr</td> 67 </tr> 68 <tr height="26" style='height:15.60pt;'> 69 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_throw_range_error</td> 70 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>抛出一个带文本信息的js RangeError。</td> 71 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 72 <td class="xl67" x:str>入参env为nullptr</td> 73 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 74 </tr> 75 <tr height="26" style='height:15.60pt;'> 76 <td class="xl67" x:str>入参msg为nullptr</td> 77 </tr> 78 <tr height="26" style='height:15.60pt;'> 79 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_error</td> 80 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断napi_value是否表示为一个error对象。</td> 81 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 82 <td class="xl67" x:str>入参env为nullptr</td> 83 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 84 </tr> 85 <tr height="26" style='height:15.60pt;'> 86 <td class="xl67" x:str>入参value为nullptr</td> 87 </tr> 88 <tr height="26" style='height:15.60pt;'> 89 <td class="xl67" x:str>入参result为nullptr</td> 90 </tr> 91 <tr height="26" style='height:15.60pt;'> 92 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_error</td> 93 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建并获取一个带文本信息的js Error。</td> 94 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 95 <td class="xl67" x:str>入参env为nullptr</td> 96 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 97 </tr> 98 <tr height="26" style='height:15.60pt;'> 99 <td class="xl67" x:str>入参msg为nullptr</td> 100 </tr> 101 <tr height="26" style='height:15.60pt;'> 102 <td class="xl67" x:str>入参result为nullptr</td> 103 </tr> 104 <tr height="26" style='height:15.60pt;'> 105 <td class="xl67" x:str>入参code不为nullptr,但不为js St<span style='display:none;'>ring或js Number类型</span></td> 106 </tr> 107 <tr height="26" style='height:15.60pt;'> 108 <td class="xl67" x:str>入参msg不为nullptr,但不为js Str<span style='display:none;'>ing类型</span></td> 109 </tr> 110 <tr height="26" style='height:15.60pt;'> 111 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_type_error</td> 112 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建并获取一个带文本信息的js TypeError。</td> 113 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 114 <td class="xl67" x:str>入参env为nullptr</td> 115 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 116 </tr> 117 <tr height="26" style='height:15.60pt;'> 118 <td class="xl67" x:str>入参msg为nullptr</td> 119 </tr> 120 <tr height="26" style='height:15.60pt;'> 121 <td class="xl67" x:str>入参result为nullptr</td> 122 </tr> 123 <tr height="26" style='height:15.60pt;'> 124 <td class="xl67" x:str>入参code不为nullptr,但不为js St<span style='display:none;'>ring或js Number类型</span></td> 125 </tr> 126 <tr height="26" style='height:15.60pt;'> 127 <td class="xl67" x:str>入参msg不为nullptr,但不为js Str<span style='display:none;'>ing类型</span></td> 128 </tr> 129 <tr height="26" style='height:15.60pt;'> 130 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_range_error</td> 131 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建并获取一个带文本信息的js RangeError。</td> 132 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 133 <td class="xl67" x:str>入参env为nullptr</td> 134 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 135 </tr> 136 <tr height="26" style='height:15.60pt;'> 137 <td class="xl67" x:str>入参msg为nullptr</td> 138 </tr> 139 <tr height="26" style='height:15.60pt;'> 140 <td class="xl67" x:str>入参result为nullptr</td> 141 </tr> 142 <tr height="26" style='height:15.60pt;'> 143 <td class="xl67" x:str>入参code不为nullptr,但不为js St<span style='display:none;'>ring或js Number类型</span></td> 144 </tr> 145 <tr height="26" style='height:15.60pt;'> 146 <td class="xl67" x:str>入参msg不为nullptr,但不为js Str<span style='display:none;'>ing类型</span></td> 147 </tr> 148 <tr height="26" style='height:15.60pt;'> 149 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_and_clear_last_exception</td> 150 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取并清除最近一次出现的异常。</td> 151 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 152 <td class="xl67" x:str>入参env为nullptr</td> 153 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 154 </tr> 155 <tr height="26" style='height:15.60pt;'> 156 <td class="xl67" x:str>入参result为nullptr</td> 157 </tr> 158 <tr height="26" style='height:15.60pt;'> 159 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_is_exception_pending</td> 160 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>判断是否出现了异常。</td> 161 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 162 <td class="xl67" x:str>入参env为nullptr</td> 163 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 164 </tr> 165 <tr height="26" style='height:15.60pt;'> 166 <td class="xl67" x:str>入参result为nullptr</td> 167 </tr> 168 <tr height="26" style='height:15.60pt;'> 169 <td class="xl66" height="26" style='height:15.60pt;' x:str>napi_fatal_error</td> 170 <td class="xl66" x:str>引发致命错误以立即终止进程<span style='display:none;'>。</span></td> 171 <td class="xl67" x:str>不涉及</td> 172 <td class="xl67" x:str>不涉及</td> 173 <td class="xl67" x:str>不涉及</td> 174 </tr> 175 <tr height="26" style='height:15.60pt;'> 176 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_open_handle_scope</td> 177 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建一个上下文环境使用。</td> 178 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 179 <td class="xl67" x:str>入参env为nullptr</td> 180 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 181 </tr> 182 <tr height="26" style='height:15.60pt;'> 183 <td class="xl67" x:str>入参result为nullptr</td> 184 </tr> 185 <tr height="26" style='height:15.60pt;'> 186 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_close_handle_scope</td> 187 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>关闭传入的上下文环境,关闭后,全部在其中声明的引用都将被关闭。</td> 188 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 189 <td class="xl67" x:str>入参env为nullptr</td> 190 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 191 </tr> 192 <tr height="26" style='height:15.60pt;'> 193 <td class="xl67" x:str>入参scope为nullptr</td> 194 </tr> 195 <tr height="26" style='height:15.60pt;'> 196 <td class="xl67" x:str>napi_handle_scope_mismatch</td> 197 <td class="xl67" x:str>napi_open_handle_scope调用次数小<span style='display:none;'>于napi_close_handle_scope</span></td> 198 <td class="xl67" x:str>napi_open_handle_scope和napi_clos<span style='display:none;'>e_handle_scope需要成对使用</span></td> 199 </tr> 200 <tr height="26" style='height:15.60pt;'> 201 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_open_escapable_handle_scope</td> 202 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建出一个可逃逸的handle scope,可将范围内声明的值返<span style='display:none;'>回到父作用域。</span></td> 203 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 204 <td class="xl67" x:str>入参env为nullptr</td> 205 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 206 </tr> 207 <tr height="26" style='height:15.60pt;'> 208 <td class="xl67" x:str>入参result为nullptr</td> 209 </tr> 210 <tr height="26" style='height:15.60pt;'> 211 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_close_escapable_handle_scope</td> 212 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>关闭传入的可逃逸的handle scope。</td> 213 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 214 <td class="xl67" x:str>入参env为nullptr</td> 215 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 216 </tr> 217 <tr height="26" style='height:15.60pt;'> 218 <td class="xl67" x:str>入参scope为nullptr</td> 219 </tr> 220 <tr height="26" style='height:15.60pt;'> 221 <td class="xl67" x:str>napi_handle_scope_mismatch</td> 222 <td class="xl67" x:str>napi_open_escapable_handle_scope<span style='display:none;'>调用次数小于napi_close_escapable_handle_scope</span></td> 223 <td class="xl67" x:str>napi_open_escapable_handle_scope<span style='display:none;'>和napi_close_escapable_handle_scope需要成对使用</span></td> 224 </tr> 225 <tr height="26" style='height:15.60pt;'> 226 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_escape_handle</td> 227 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>提升传入的js object的生命周期到其父作用域。</td> 228 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 229 <td class="xl67" x:str>入参env为nullptr</td> 230 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 231 </tr> 232 <tr height="26" style='height:15.60pt;'> 233 <td class="xl67" x:str>入参scope为nullptr</td> 234 </tr> 235 <tr height="26" style='height:15.60pt;'> 236 <td class="xl67" x:str>入参escapee为nullptr</td> 237 </tr> 238 <tr height="26" style='height:15.60pt;'> 239 <td class="xl67" x:str>入参result为nullptr</td> 240 </tr> 241 <tr height="26" style='height:15.60pt;'> 242 <td class="xl67" x:str>napi_escape_called_twice</td> 243 <td class="xl67" x:str>该scope已经调用过napi_escape_han<span style='display:none;'>dle</span></td> 244 <td class="xl67" x:str>请勿重复调用napi_escape_handle</td> 245 </tr> 246 <tr height="26" style='height:15.60pt;'> 247 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_reference</td> 248 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>为Object创建一个reference,以延长其生命周期。调用者需要自己管理reference生命周<span style='display:none;'>期。</span></td> 249 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 250 <td class="xl67" x:str>入参env为nullptr</td> 251 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 252 </tr> 253 <tr height="26" style='height:15.60pt;'> 254 <td class="xl67" x:str>入参value为nullptr</td> 255 </tr> 256 <tr height="26" style='height:15.60pt;'> 257 <td class="xl67" x:str>入参result为nullptr</td> 258 </tr> 259 <tr height="26" style='height:15.60pt;'> 260 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_delete_reference</td> 261 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>删除传入的reference。</td> 262 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 263 <td class="xl67" x:str>入参env为nullptr</td> 264 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 265 </tr> 266 <tr height="26" style='height:15.60pt;'> 267 <td class="xl67" x:str>入参ref为nullptr</td> 268 </tr> 269 <tr height="26" style='height:15.60pt;'> 270 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_reference_ref</td> 271 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>增加传入的reference的引用计数,并获取该计数。</td> 272 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 273 <td class="xl67" x:str>入参env为nullptr</td> 274 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 275 </tr> 276 <tr height="26" style='height:15.60pt;'> 277 <td class="xl67" x:str>入参ref为nullptr</td> 278 </tr> 279 <tr height="26" style='height:15.60pt;'> 280 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_reference_unref</td> 281 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>减少传入的reference的引用计数,并获取该计数。</td> 282 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 283 <td class="xl67" x:str>入参env为nullptr</td> 284 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 285 </tr> 286 <tr height="26" style='height:15.60pt;'> 287 <td class="xl67" x:str>入参ref为nullptr</td> 288 </tr> 289 <tr height="26" style='height:15.60pt;'> 290 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_get_reference_value</td> 291 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取与reference相关联的js Object。</td> 292 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 293 <td class="xl67" x:str>入参env为nullptr</td> 294 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 295 </tr> 296 <tr height="26" style='height:15.60pt;'> 297 <td class="xl67" x:str>入参ref为nullptr</td> 298 </tr> 299 <tr height="26" style='height:15.60pt;'> 300 <td class="xl67" x:str>入参result为nullptr</td> 301 </tr> 302 <tr height="26" style='height:15.60pt;'> 303 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_array</td> 304 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建并获取一个js Array。</td> 305 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 306 <td class="xl67" x:str>入参env为nullptr</td> 307 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 308 </tr> 309 <tr height="26" style='height:15.60pt;'> 310 <td class="xl67" x:str>入参result为nullptr</td> 311 </tr> 312 <tr height="26" style='height:15.60pt;'> 313 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_array_with_length</td> 314 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建并获取一个指定长度的js Array。</td> 315 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 316 <td class="xl67" x:str>入参env为nullptr</td> 317 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 318 </tr> 319 <tr height="26" style='height:15.60pt;'> 320 <td class="xl67" x:str>入参result为nullptr</td> 321 </tr> 322 <tr height="26" style='height:15.60pt;'> 323 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_create_arraybuffer</td> 324 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>创建并获取一个指定大小的js ArrayBuffer。</td> 325 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 326 <td class="xl67" x:str>入参env为nullptr</td> 327 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 328 </tr> 329 <tr height="26" style='height:15.60pt;'> 330 <td class="xl67" x:str>入参data为nullptr</td> 331 </tr> 332 <tr height="26" style='height:15.60pt;'> 333 <td class="xl67" x:str>入参result为nullptr</td> 334 </tr> 335 <tr height="26" style='height:15.60pt;'> 336 <td class="xl67" x:str>napi_pending_exception</td> 337 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 338 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 339 </tr> 340 <tr height="26" style='height:15.60pt;'> 341 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_external</td> 342 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>分配一个附加有外部数据的js value。</td> 343 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 344 <td class="xl67" x:str>入参env为nullptr</td> 345 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 346 </tr> 347 <tr height="26" style='height:15.60pt;'> 348 <td class="xl67" x:str>入参result为nullptr</td> 349 </tr> 350 <tr height="26" style='height:15.60pt;'> 351 <td class="xl67" x:str>napi_pending_exception</td> 352 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 353 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 354 </tr> 355 <tr height="26" style='height:15.60pt;'> 356 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_external_arraybuffer</td> 357 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>分配一个附加有外部数据的js ArrayBuffer。</td> 358 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 359 <td class="xl67" x:str>入参env为nullptr</td> 360 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 361 </tr> 362 <tr height="26" style='height:15.60pt;'> 363 <td class="xl67" x:str>入参external_data为nullptr</td> 364 </tr> 365 <tr height="26" style='height:15.60pt;'> 366 <td class="xl67" x:str>入参finalize_cb为nullptr</td> 367 </tr> 368 <tr height="26" style='height:15.60pt;'> 369 <td class="xl67" x:str>入参result为nullptr</td> 370 </tr> 371 <tr height="26" style='height:15.60pt;'> 372 <td class="xl67" x:str>napi_pending_exception</td> 373 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 374 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 375 </tr> 376 <tr height="26" style='height:15.60pt;'> 377 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_object</td> 378 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建一个默认的js Object。</td> 379 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 380 <td class="xl67" x:str>入参env为nullptr</td> 381 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 382 </tr> 383 <tr height="26" style='height:15.60pt;'> 384 <td class="xl67" x:str>入参result为nullptr</td> 385 </tr> 386 <tr height="26" style='height:15.60pt;'> 387 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_symbol</td> 388 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>创建一个js Symbol。</td> 389 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 390 <td class="xl67" x:str>入参env为nullptr</td> 391 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 392 </tr> 393 <tr height="26" style='height:15.60pt;'> 394 <td class="xl67" x:str>入参result为nullptr</td> 395 </tr> 396 <tr height="26" style='height:15.60pt;'> 397 <td class="xl67" x:str>入参description不为nullptr,且不<span style='display:none;'>是js String类型</span></td> 398 </tr> 399 <tr height="26" style='height:15.60pt;'> 400 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_create_typedarray</td> 401 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>通过现有的ArrayBuffer创建一个js TypeArray。</td> 402 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 403 <td class="xl67" x:str>入参env为nullptr</td> 404 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 405 </tr> 406 <tr height="26" style='height:15.60pt;'> 407 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 408 </tr> 409 <tr height="26" style='height:15.60pt;'> 410 <td class="xl67" x:str>入参result为nullptr</td> 411 </tr> 412 <tr height="26" style='height:15.60pt;'> 413 <td class="xl67" x:str>入参type不为napi_typedarray_type<span style='display:none;'>类型</span></td> 414 </tr> 415 <tr height="26" style='height:15.60pt;'> 416 <td class="xl67" x:str>napi_arraybuffer_expected</td> 417 <td class="xl67" x:str>入参arraybuffer不为js ArrayBuffe<span style='display:none;'>r类型</span></td> 418 </tr> 419 <tr height="26" style='height:15.60pt;'> 420 <td class="xl67" x:str>napi_pending_exception</td> 421 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 422 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 423 </tr> 424 <tr height="26" style='height:15.60pt;'> 425 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_create_dataview</td> 426 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>通过现有的ArrayBuffer创建一个js DataView。</td> 427 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 428 <td class="xl67" x:str>入参env为nullptr</td> 429 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 430 </tr> 431 <tr height="26" style='height:15.60pt;'> 432 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 433 </tr> 434 <tr height="26" style='height:15.60pt;'> 435 <td class="xl67" x:str>入参result为nullptr</td> 436 </tr> 437 <tr height="26" style='height:15.60pt;'> 438 <td class="xl67" x:str>napi_arraybuffer_expected</td> 439 <td class="xl67" x:str>入参arraybuffer不为js ArrayBuffe<span style='display:none;'>r类型</span></td> 440 </tr> 441 <tr height="26" style='height:15.60pt;'> 442 <td class="xl67" rowspan="2" x:str>napi_pending_exception</td> 443 <td class="xl67" x:str>入参length与入参byte_offset相加<span style='display:none;'>超过入参arraybuffer的byte长度</span></td> 444 <td class="xl67" x:str>需要检查访问长度</td> 445 </tr> 446 <tr height="26" style='height:15.60pt;'> 447 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 448 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 449 </tr> 450 <tr height="26" style='height:15.60pt;'> 451 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_int32</td> 452 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的int32_t数据创建js Number。</td> 453 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 454 <td class="xl67" x:str>入参env为nullptr</td> 455 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 456 </tr> 457 <tr height="26" style='height:15.60pt;'> 458 <td class="xl67" x:str>入参result为nullptr</td> 459 </tr> 460 <tr height="26" style='height:15.60pt;'> 461 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_uint32</td> 462 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的uint32_t数据创建js Number。</td> 463 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 464 <td class="xl67" x:str>入参env为nullptr</td> 465 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 466 </tr> 467 <tr height="26" style='height:15.60pt;'> 468 <td class="xl67" x:str>入参result为nullptr</td> 469 </tr> 470 <tr height="26" style='height:15.60pt;'> 471 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_int64</td> 472 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的int64_t数据创建js Number。</td> 473 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 474 <td class="xl67" x:str>入参env为nullptr</td> 475 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 476 </tr> 477 <tr height="26" style='height:15.60pt;'> 478 <td class="xl67" x:str>入参result为nullptr</td> 479 </tr> 480 <tr height="26" style='height:15.60pt;'> 481 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_double</td> 482 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的double数据创建js Number。</td> 483 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 484 <td class="xl67" x:str>入参env为nullptr</td> 485 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 486 </tr> 487 <tr height="26" style='height:15.60pt;'> 488 <td class="xl67" x:str>入参result为nullptr</td> 489 </tr> 490 <tr height="26" style='height:15.60pt;'> 491 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_string_latin1</td> 492 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>通过ISO-8859-1编码的C字符串数据创建js String。</td> 493 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 494 <td class="xl67" x:str>入参env为nullptr</td> 495 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 496 </tr> 497 <tr height="26" style='height:15.60pt;'> 498 <td class="xl67" x:str>入参str为nullptr</td> 499 </tr> 500 <tr height="26" style='height:15.60pt;'> 501 <td class="xl67" x:str>入参result为nullptr</td> 502 </tr> 503 <tr height="26" style='height:15.60pt;'> 504 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_string_utf8</td> 505 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>通过UTF8编码的C字符串数据创建js String。</td> 506 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 507 <td class="xl67" x:str>入参env为nullptr</td> 508 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 509 </tr> 510 <tr height="26" style='height:15.60pt;'> 511 <td class="xl67" x:str>入参str为nullptr</td> 512 </tr> 513 <tr height="26" style='height:15.60pt;'> 514 <td class="xl67" x:str>入参result为nullptr</td> 515 </tr> 516 <tr height="26" style='height:15.60pt;'> 517 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_create_string_utf16</td> 518 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>通过UTF16编码的C字符串数据创建js String。</td> 519 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 520 <td class="xl67" x:str>入参env为nullptr</td> 521 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 522 </tr> 523 <tr height="26" style='height:15.60pt;'> 524 <td class="xl67" x:str>入参str为nullptr</td> 525 </tr> 526 <tr height="26" style='height:15.60pt;'> 527 <td class="xl67" x:str>入参result为nullptr</td> 528 </tr> 529 <tr height="26" style='height:15.60pt;'> 530 <td class="xl67" x:str>入参length值不为NAPI_AUTO_LENGTH<span style='display:none;'>,但超过INT_MAX</span></td> 531 </tr> 532 <tr height="26" style='height:15.60pt;'> 533 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_array_length</td> 534 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取array的length。</td> 535 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 536 <td class="xl67" x:str>入参env为nullptr</td> 537 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 538 </tr> 539 <tr height="26" style='height:15.60pt;'> 540 <td class="xl67" x:str>入参value为nullptr</td> 541 </tr> 542 <tr height="26" style='height:15.60pt;'> 543 <td class="xl67" x:str>入参result为nullptr</td> 544 </tr> 545 <tr height="26" style='height:15.60pt;'> 546 <td class="xl67" x:str>napi_array_expected</td> 547 <td class="xl67" x:str>入参value既不是js Array类型,也<span style='display:none;'>不是SharedArray类型</span></td> 548 </tr> 549 <tr height="26" style='height:15.60pt;'> 550 <td class="xl67" x:str>napi_pending_exception</td> 551 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 552 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 553 </tr> 554 <tr height="26" style='height:15.60pt;'> 555 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_arraybuffer_info</td> 556 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取ArrayBuffer的底层data buffer及其长度。</td> 557 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 558 <td class="xl67" x:str>入参env为nullptr</td> 559 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 560 </tr> 561 <tr height="26" style='height:15.60pt;'> 562 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 563 </tr> 564 <tr height="26" style='height:15.60pt;'> 565 <td class="xl67" x:str>入参byte_length为nullptr</td> 566 </tr> 567 <tr height="26" style='height:15.60pt;'> 568 <td class="xl67" x:str>napi_arraybuffer_expected</td> 569 <td class="xl67" x:str>入参arraybuffer既不是js ArrayBuf<span style='display:none;'>fer类型,也不是SharedArrayBuffer类型</span></td> 570 </tr> 571 <tr height="26" style='height:15.60pt;'> 572 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_prototype</td> 573 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取给定js Object的prototype。</td> 574 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 575 <td class="xl67" x:str>入参env为nullptr</td> 576 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 577 </tr> 578 <tr height="26" style='height:15.60pt;'> 579 <td class="xl67" x:str>入参object为nullptr</td> 580 </tr> 581 <tr height="26" style='height:15.60pt;'> 582 <td class="xl67" x:str>入参result为nullptr</td> 583 </tr> 584 <tr height="26" style='height:15.60pt;'> 585 <td class="xl67" x:str>napi_object_expected</td> 586 <td class="xl67" x:str>入参object不为js Object类型</td> 587 </tr> 588 <tr height="26" style='height:15.60pt;'> 589 <td class="xl67" x:str>napi_pending_exception</td> 590 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 591 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 592 </tr> 593 <tr height="26" style='height:15.60pt;'> 594 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_get_typedarray_info</td> 595 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取给定TypedArray的各种属性。</td> 596 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 597 <td class="xl67" x:str>入参env为nullptr</td> 598 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 599 </tr> 600 <tr height="26" style='height:15.60pt;'> 601 <td class="xl67" x:str>入参typedarray为nullptr</td> 602 </tr> 603 <tr height="26" style='height:15.60pt;'> 604 <td class="xl67" x:str>入参typedarray既不是js TypedArra<span style='display:none;'>y类型,也不是ShareTypedArray类型</span></td> 605 </tr> 606 <tr height="26" style='height:15.60pt;'> 607 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_get_dataview_info</td> 608 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取给定DataView的各种属性。</td> 609 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 610 <td class="xl67" x:str>入参env为nullptr</td> 611 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 612 </tr> 613 <tr height="26" style='height:15.60pt;'> 614 <td class="xl67" x:str>入参dataview为nullptr</td> 615 </tr> 616 <tr height="26" style='height:15.60pt;'> 617 <td class="xl67" x:str>入参dataview不为js DataView类型</td> 618 </tr> 619 <tr height="26" style='height:15.60pt;'> 620 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_bool</td> 621 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js Boolean对应的C bool值。</td> 622 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 623 <td class="xl67" x:str>入参env为nullptr</td> 624 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 625 </tr> 626 <tr height="26" style='height:15.60pt;'> 627 <td class="xl67" x:str>入参value为nullptr</td> 628 </tr> 629 <tr height="26" style='height:15.60pt;'> 630 <td class="xl67" x:str>入参result为nullptr</td> 631 </tr> 632 <tr height="26" style='height:15.60pt;'> 633 <td class="xl67" x:str>napi_boolean_expected</td> 634 <td class="xl67" x:str>入参value不为js Bool类型</td> 635 </tr> 636 <tr height="26" style='height:15.60pt;'> 637 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_double</td> 638 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js Number对应的C double值。</td> 639 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 640 <td class="xl67" x:str>入参env为nullptr</td> 641 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 642 </tr> 643 <tr height="26" style='height:15.60pt;'> 644 <td class="xl67" x:str>入参value为nullptr</td> 645 </tr> 646 <tr height="26" style='height:15.60pt;'> 647 <td class="xl67" x:str>入参result为nullptr</td> 648 </tr> 649 <tr height="26" style='height:15.60pt;'> 650 <td class="xl67" x:str>napi_number_expected</td> 651 <td class="xl67" x:str>入参value不为js Number类型</td> 652 </tr> 653 <tr height="26" style='height:15.60pt;'> 654 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_external</td> 655 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取先前通过napi_create_external()传递的外部数据指针。</td> 656 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 657 <td class="xl67" x:str>入参env为nullptr</td> 658 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 659 </tr> 660 <tr height="26" style='height:15.60pt;'> 661 <td class="xl67" x:str>入参value为nullptr</td> 662 </tr> 663 <tr height="26" style='height:15.60pt;'> 664 <td class="xl67" x:str>入参result为nullptr</td> 665 </tr> 666 <tr height="26" style='height:15.60pt;'> 667 <td class="xl67" x:str>napi_object_expected</td> 668 <td class="xl67" x:str>入参value不为external类型</td> 669 </tr> 670 <tr height="26" style='height:15.60pt;'> 671 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_int32</td> 672 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js Number对应的C int32值。</td> 673 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 674 <td class="xl67" x:str>入参env为nullptr</td> 675 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 676 </tr> 677 <tr height="26" style='height:15.60pt;'> 678 <td class="xl67" x:str>入参value为nullptr</td> 679 </tr> 680 <tr height="26" style='height:15.60pt;'> 681 <td class="xl67" x:str>入参result为nullptr</td> 682 </tr> 683 <tr height="26" style='height:15.60pt;'> 684 <td class="xl67" x:str>napi_number_expected</td> 685 <td class="xl67" x:str>入参value不为js Number类型</td> 686 </tr> 687 <tr height="26" style='height:15.60pt;'> 688 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_int64</td> 689 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js Number对应的C int64值。</td> 690 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 691 <td class="xl67" x:str>入参env为nullptr</td> 692 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 693 </tr> 694 <tr height="26" style='height:15.60pt;'> 695 <td class="xl67" x:str>入参value为nullptr</td> 696 </tr> 697 <tr height="26" style='height:15.60pt;'> 698 <td class="xl67" x:str>入参result为nullptr</td> 699 </tr> 700 <tr height="26" style='height:15.60pt;'> 701 <td class="xl67" x:str>napi_number_expected</td> 702 <td class="xl67" x:str>入参value不为js Number类型</td> 703 </tr> 704 <tr height="26" style='height:15.60pt;'> 705 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_string_latin1</td> 706 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js value对应的ISO-8859-1编码的字符串。</td> 707 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 708 <td class="xl67" x:str>入参env为nullptr</td> 709 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 710 </tr> 711 <tr height="26" style='height:15.60pt;'> 712 <td class="xl67" x:str>入参value为nullptr</td> 713 </tr> 714 <tr height="26" style='height:15.60pt;'> 715 <td class="xl67" x:str>入参buf与result都为nullptr</td> 716 </tr> 717 <tr height="26" style='height:15.60pt;'> 718 <td class="xl67" x:str>napi_string_expected</td> 719 <td class="xl67" x:str>入参value不为js String类型</td> 720 </tr> 721 <tr height="26" style='height:15.60pt;'> 722 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_string_utf8</td> 723 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js value对应的UTF8编码的字符串。</td> 724 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 725 <td class="xl67" x:str>入参env为nullptr</td> 726 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 727 </tr> 728 <tr height="26" style='height:15.60pt;'> 729 <td class="xl67" x:str>入参value为nullptr</td> 730 </tr> 731 <tr height="26" style='height:15.60pt;'> 732 <td class="xl67" x:str>入参buf与result都为nullptr</td> 733 </tr> 734 <tr height="26" style='height:15.60pt;'> 735 <td class="xl67" x:str>napi_string_expected</td> 736 <td class="xl67" x:str>入参value不为js String类型</td> 737 </tr> 738 <tr height="26" style='height:15.60pt;'> 739 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_string_utf16</td> 740 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js value对应的UTF16编码的字符串。</td> 741 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 742 <td class="xl67" x:str>入参env为nullptr</td> 743 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 744 </tr> 745 <tr height="26" style='height:15.60pt;'> 746 <td class="xl67" x:str>入参value为nullptr</td> 747 </tr> 748 <tr height="26" style='height:15.60pt;'> 749 <td class="xl67" x:str>入参buf与result都为nullptr</td> 750 </tr> 751 <tr height="26" style='height:15.60pt;'> 752 <td class="xl67" x:str>napi_string_expected</td> 753 <td class="xl67" x:str>入参value不为js String类型</td> 754 </tr> 755 <tr height="26" style='height:15.60pt;'> 756 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_uint32</td> 757 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js Number对应的C uint32值。</td> 758 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 759 <td class="xl67" x:str>入参env为nullptr</td> 760 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 761 </tr> 762 <tr height="26" style='height:15.60pt;'> 763 <td class="xl67" x:str>入参value为nullptr</td> 764 </tr> 765 <tr height="26" style='height:15.60pt;'> 766 <td class="xl67" x:str>入参result为nullptr</td> 767 </tr> 768 <tr height="26" style='height:15.60pt;'> 769 <td class="xl67" x:str>napi_number_expected</td> 770 <td class="xl67" x:str>入参value不为js Number类型</td> 771 </tr> 772 <tr height="26" style='height:15.60pt;'> 773 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_boolean</td> 774 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>根据给定的C boolean值,获取js bool对象。</td> 775 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 776 <td class="xl67" x:str>入参env为nullptr</td> 777 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 778 </tr> 779 <tr height="26" style='height:15.60pt;'> 780 <td class="xl67" x:str>入参value为nullptr</td> 781 </tr> 782 <tr height="26" style='height:15.60pt;'> 783 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_global</td> 784 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取global对象。</td> 785 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 786 <td class="xl67" x:str>入参env为nullptr</td> 787 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 788 </tr> 789 <tr height="26" style='height:15.60pt;'> 790 <td class="xl67" x:str>入参value为nullptr</td> 791 </tr> 792 <tr height="26" style='height:15.60pt;'> 793 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_null</td> 794 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取null对象。</td> 795 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 796 <td class="xl67" x:str>入参env为nullptr</td> 797 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 798 </tr> 799 <tr height="26" style='height:15.60pt;'> 800 <td class="xl67" x:str>入参value为nullptr</td> 801 </tr> 802 <tr height="26" style='height:15.60pt;'> 803 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_undefined</td> 804 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取undefined对象。</td> 805 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 806 <td class="xl67" x:str>入参env为nullptr</td> 807 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 808 </tr> 809 <tr height="26" style='height:15.60pt;'> 810 <td class="xl67" x:str>入参value为nullptr</td> 811 </tr> 812 <tr height="26" style='height:15.60pt;'> 813 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_coerce_to_bool</td> 814 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>将给定的js value强转成js Boolean。</td> 815 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 816 <td class="xl67" x:str>入参env为nullptr</td> 817 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 818 </tr> 819 <tr height="26" style='height:15.60pt;'> 820 <td class="xl67" x:str>入参value为nullptr</td> 821 </tr> 822 <tr height="26" style='height:15.60pt;'> 823 <td class="xl67" x:str>入参result为nullptr</td> 824 </tr> 825 <tr height="26" style='height:15.60pt;'> 826 <td class="xl67" x:str>napi_pending_exception</td> 827 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 828 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 829 </tr> 830 <tr height="26" style='height:15.60pt;'> 831 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_coerce_to_number</td> 832 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将给定的js value强转成js Number。</td> 833 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 834 <td class="xl67" x:str>入参env为nullptr</td> 835 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 836 </tr> 837 <tr height="26" style='height:15.60pt;'> 838 <td class="xl67" x:str>入参value为nullptr</td> 839 </tr> 840 <tr height="26" style='height:15.60pt;'> 841 <td class="xl67" x:str>入参result为nullptr</td> 842 </tr> 843 <tr height="26" style='height:15.60pt;'> 844 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_coerce_to_object</td> 845 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将给定的js value强转成js Object。</td> 846 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 847 <td class="xl67" x:str>入参env为nullptr</td> 848 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 849 </tr> 850 <tr height="26" style='height:15.60pt;'> 851 <td class="xl67" x:str>入参value为nullptr</td> 852 </tr> 853 <tr height="26" style='height:15.60pt;'> 854 <td class="xl67" x:str>入参result为nullptr</td> 855 </tr> 856 <tr height="26" style='height:15.60pt;'> 857 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_coerce_to_string</td> 858 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将给定的js value强转成js String。</td> 859 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 860 <td class="xl67" x:str>入参env为nullptr</td> 861 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 862 </tr> 863 <tr height="26" style='height:15.60pt;'> 864 <td class="xl67" x:str>入参value为nullptr</td> 865 </tr> 866 <tr height="26" style='height:15.60pt;'> 867 <td class="xl67" x:str>入参result为nullptr</td> 868 </tr> 869 <tr height="26" style='height:15.60pt;'> 870 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_typeof</td> 871 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取给定js value的js type。</td> 872 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 873 <td class="xl67" x:str>入参env为nullptr</td> 874 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 875 </tr> 876 <tr height="26" style='height:15.60pt;'> 877 <td class="xl67" x:str>入参value为nullptr</td> 878 </tr> 879 <tr height="26" style='height:15.60pt;'> 880 <td class="xl67" x:str>入参result为nullptr</td> 881 </tr> 882 <tr height="26" style='height:15.60pt;'> 883 <td class="xl66" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_instanceof</td> 884 <td class="xl66" rowspan="7" style='border-right:none;border-bottom:none;' x:str>判断给定object是否为给定constructor的实例。</td> 885 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 886 <td class="xl67" x:str>入参env为nullptr</td> 887 <td class="xl67" rowspan="6" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 888 </tr> 889 <tr height="26" style='height:15.60pt;'> 890 <td class="xl67" x:str>入参object为nullptr</td> 891 </tr> 892 <tr height="26" style='height:15.60pt;'> 893 <td class="xl67" x:str>入参constructor为nullptr</td> 894 </tr> 895 <tr height="26" style='height:15.60pt;'> 896 <td class="xl67" x:str>入参result为nullptr</td> 897 </tr> 898 <tr height="26" style='height:15.60pt;'> 899 <td class="xl67" x:str>napi_object_expected</td> 900 <td class="xl67" x:str>入参object不为js Object类型</td> 901 </tr> 902 <tr height="26" style='height:15.60pt;'> 903 <td class="xl67" x:str>napi_function_expected</td> 904 <td class="xl67" x:str>入参constructor不为js Function类<span style='display:none;'>型</span></td> 905 </tr> 906 <tr height="26" style='height:15.60pt;'> 907 <td class="xl67" x:str>napi_pending_exception</td> 908 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 909 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 910 </tr> 911 <tr height="26" style='height:15.60pt;'> 912 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_array</td> 913 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否为array。</td> 914 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 915 <td class="xl67" x:str>入参env为nullptr</td> 916 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 917 </tr> 918 <tr height="26" style='height:15.60pt;'> 919 <td class="xl67" x:str>入参value为nullptr</td> 920 </tr> 921 <tr height="26" style='height:15.60pt;'> 922 <td class="xl67" x:str>入参result为nullptr</td> 923 </tr> 924 <tr height="26" style='height:15.60pt;'> 925 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_arraybuffer</td> 926 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否为ArrayBuffer。</td> 927 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 928 <td class="xl67" x:str>入参env为nullptr</td> 929 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 930 </tr> 931 <tr height="26" style='height:15.60pt;'> 932 <td class="xl67" x:str>入参value为nullptr</td> 933 </tr> 934 <tr height="26" style='height:15.60pt;'> 935 <td class="xl67" x:str>入参result为nullptr</td> 936 </tr> 937 <tr height="26" style='height:15.60pt;'> 938 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_typedarray</td> 939 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否表示一个TypedArray。</td> 940 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 941 <td class="xl67" x:str>入参env为nullptr</td> 942 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 943 </tr> 944 <tr height="26" style='height:15.60pt;'> 945 <td class="xl67" x:str>入参value为nullptr</td> 946 </tr> 947 <tr height="26" style='height:15.60pt;'> 948 <td class="xl67" x:str>入参result为nullptr</td> 949 </tr> 950 <tr height="26" style='height:15.60pt;'> 951 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_dataview</td> 952 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否表示一个DataView。</td> 953 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 954 <td class="xl67" x:str>入参env为nullptr</td> 955 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 956 </tr> 957 <tr height="26" style='height:15.60pt;'> 958 <td class="xl67" x:str>入参value为nullptr</td> 959 </tr> 960 <tr height="26" style='height:15.60pt;'> 961 <td class="xl67" x:str>入参result为nullptr</td> 962 </tr> 963 <tr height="26" style='height:15.60pt;'> 964 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_date</td> 965 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否为js Date对象。</td> 966 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 967 <td class="xl67" x:str>入参env为nullptr</td> 968 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 969 </tr> 970 <tr height="26" style='height:15.60pt;'> 971 <td class="xl67" x:str>入参value为nullptr</td> 972 </tr> 973 <tr height="26" style='height:15.60pt;'> 974 <td class="xl67" x:str>入参result为nullptr</td> 975 </tr> 976 <tr height="26" style='height:15.60pt;'> 977 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_strict_equals</td> 978 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>判断给定的两个js value是否严格相等。</td> 979 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 980 <td class="xl67" x:str>入参env为nullptr</td> 981 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 982 </tr> 983 <tr height="26" style='height:15.60pt;'> 984 <td class="xl67" x:str>入参lhs为nullptr</td> 985 </tr> 986 <tr height="26" style='height:15.60pt;'> 987 <td class="xl67" x:str>入参rhs为nullptr</td> 988 </tr> 989 <tr height="26" style='height:15.60pt;'> 990 <td class="xl67" x:str>入参result为nullptr</td> 991 </tr> 992 <tr height="26" style='height:15.60pt;'> 993 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_property_names</td> 994 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>以字符串数组的形式获取对象的可枚举属性的名称。</td> 995 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 996 <td class="xl67" x:str>入参env为nullptr</td> 997 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 998 </tr> 999 <tr height="26" style='height:15.60pt;'> 1000 <td class="xl67" x:str>入参object为nullptr</td> 1001 </tr> 1002 <tr height="26" style='height:15.60pt;'> 1003 <td class="xl67" x:str>入参result为nullptr</td> 1004 </tr> 1005 <tr height="26" style='height:15.60pt;'> 1006 <td class="xl67" x:str>napi_object_expected</td> 1007 <td class="xl67" x:str>入参object不为js Object类型</td> 1008 </tr> 1009 <tr height="26" style='height:15.60pt;'> 1010 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_set_property</td> 1011 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>对给定Object设置属性。</td> 1012 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1013 <td class="xl67" x:str>入参env为nullptr</td> 1014 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1015 </tr> 1016 <tr height="26" style='height:15.60pt;'> 1017 <td class="xl67" x:str>入参object为nullptr</td> 1018 </tr> 1019 <tr height="26" style='height:15.60pt;'> 1020 <td class="xl67" x:str>入参key为nullptr</td> 1021 </tr> 1022 <tr height="26" style='height:15.60pt;'> 1023 <td class="xl67" x:str>入参result为nullptr</td> 1024 </tr> 1025 <tr height="26" style='height:15.60pt;'> 1026 <td class="xl67" x:str>napi_object_expected</td> 1027 <td class="xl67" x:str>入参object不为js Object类型</td> 1028 </tr> 1029 <tr height="26" style='height:15.60pt;'> 1030 <td class="xl67" x:str>napi_pending_exception</td> 1031 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1032 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1033 </tr> 1034 <tr height="26" style='height:15.60pt;'> 1035 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_get_property</td> 1036 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>获取给定Object的给定属性。</td> 1037 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1038 <td class="xl67" x:str>入参env为nullptr</td> 1039 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1040 </tr> 1041 <tr height="26" style='height:15.60pt;'> 1042 <td class="xl67" x:str>入参object为nullptr</td> 1043 </tr> 1044 <tr height="26" style='height:15.60pt;'> 1045 <td class="xl67" x:str>入参key为nullptr</td> 1046 </tr> 1047 <tr height="26" style='height:15.60pt;'> 1048 <td class="xl67" x:str>入参result为nullptr</td> 1049 </tr> 1050 <tr height="26" style='height:15.60pt;'> 1051 <td class="xl67" x:str>napi_object_expected</td> 1052 <td class="xl67" x:str>入参object不为js Object类型</td> 1053 </tr> 1054 <tr height="26" style='height:15.60pt;'> 1055 <td class="xl67" x:str>napi_pending_exception</td> 1056 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1057 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1058 </tr> 1059 <tr height="26" style='height:15.60pt;'> 1060 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_has_property</td> 1061 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>判断给定对象中是否存在给定属性。</td> 1062 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1063 <td class="xl67" x:str>入参env为nullptr</td> 1064 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1065 </tr> 1066 <tr height="26" style='height:15.60pt;'> 1067 <td class="xl67" x:str>入参object为nullptr</td> 1068 </tr> 1069 <tr height="26" style='height:15.60pt;'> 1070 <td class="xl67" x:str>入参key为nullptr</td> 1071 </tr> 1072 <tr height="26" style='height:15.60pt;'> 1073 <td class="xl67" x:str>入参result为nullptr</td> 1074 </tr> 1075 <tr height="26" style='height:15.60pt;'> 1076 <td class="xl67" x:str>napi_object_expected</td> 1077 <td class="xl67" x:str>入参object不为js Object类型</td> 1078 </tr> 1079 <tr height="26" style='height:15.60pt;'> 1080 <td class="xl67" x:str>napi_pending_exception</td> 1081 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1082 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1083 </tr> 1084 <tr height="26" style='height:15.60pt;'> 1085 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_delete_property</td> 1086 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>尝试从给定Object中删除给定key属性。</td> 1087 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1088 <td class="xl67" x:str>入参env为nullptr</td> 1089 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1090 </tr> 1091 <tr height="26" style='height:15.60pt;'> 1092 <td class="xl67" x:str>入参object为nullptr</td> 1093 </tr> 1094 <tr height="26" style='height:15.60pt;'> 1095 <td class="xl67" x:str>入参key为nullptr</td> 1096 </tr> 1097 <tr height="26" style='height:15.60pt;'> 1098 <td class="xl67" x:str>napi_object_expected</td> 1099 <td class="xl67" x:str>入参object不为js Object类型</td> 1100 </tr> 1101 <tr height="26" style='height:15.60pt;'> 1102 <td class="xl67" x:str>napi_pending_exception</td> 1103 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1104 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1105 </tr> 1106 <tr height="26" style='height:15.60pt;'> 1107 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_has_own_property</td> 1108 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>判断给定Object中是否有名为key的own property。</td> 1109 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1110 <td class="xl67" x:str>入参env为nullptr</td> 1111 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1112 </tr> 1113 <tr height="26" style='height:15.60pt;'> 1114 <td class="xl67" x:str>入参object为nullptr</td> 1115 </tr> 1116 <tr height="26" style='height:15.60pt;'> 1117 <td class="xl67" x:str>入参key为nullptr</td> 1118 </tr> 1119 <tr height="26" style='height:15.60pt;'> 1120 <td class="xl67" x:str>入参result为nullptr</td> 1121 </tr> 1122 <tr height="26" style='height:15.60pt;'> 1123 <td class="xl67" x:str>napi_object_expected</td> 1124 <td class="xl67" x:str>入参object不为js Object类型</td> 1125 </tr> 1126 <tr height="26" style='height:15.60pt;'> 1127 <td class="xl67" x:str>napi_pending_exception</td> 1128 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1129 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1130 </tr> 1131 <tr height="26" style='height:15.60pt;'> 1132 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_set_named_property</td> 1133 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>对给定Object设置一个给定名称的属性。</td> 1134 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1135 <td class="xl67" x:str>入参env为nullptr</td> 1136 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1137 </tr> 1138 <tr height="26" style='height:15.60pt;'> 1139 <td class="xl67" x:str>入参object为nullptr</td> 1140 </tr> 1141 <tr height="26" style='height:15.60pt;'> 1142 <td class="xl67" x:str>入参utf8name为nullptr</td> 1143 </tr> 1144 <tr height="26" style='height:15.60pt;'> 1145 <td class="xl67" x:str>入参result为nullptr</td> 1146 </tr> 1147 <tr height="26" style='height:15.60pt;'> 1148 <td class="xl67" x:str>napi_object_expected</td> 1149 <td class="xl67" x:str>入参object不为js Object类型</td> 1150 </tr> 1151 <tr height="26" style='height:15.60pt;'> 1152 <td class="xl67" x:str>napi_pending_exception</td> 1153 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1154 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1155 </tr> 1156 <tr height="26" style='height:15.60pt;'> 1157 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_get_named_property</td> 1158 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>获取给定Object中指定名称的属性。</td> 1159 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1160 <td class="xl67" x:str>入参env为nullptr</td> 1161 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1162 </tr> 1163 <tr height="26" style='height:15.60pt;'> 1164 <td class="xl67" x:str>入参object为nullptr</td> 1165 </tr> 1166 <tr height="26" style='height:15.60pt;'> 1167 <td class="xl67" x:str>入参utf8name为nullptr</td> 1168 </tr> 1169 <tr height="26" style='height:15.60pt;'> 1170 <td class="xl67" x:str>入参result为nullptr</td> 1171 </tr> 1172 <tr height="26" style='height:15.60pt;'> 1173 <td class="xl67" x:str>napi_object_expected</td> 1174 <td class="xl67" x:str>入参object不为js Object类型</td> 1175 </tr> 1176 <tr height="26" style='height:15.60pt;'> 1177 <td class="xl67" x:str>napi_pending_exception</td> 1178 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1179 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1180 </tr> 1181 <tr height="26" style='height:15.60pt;'> 1182 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_has_named_property</td> 1183 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>判断给定Object中是否有给定名称的属性。</td> 1184 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1185 <td class="xl67" x:str>入参env为nullptr</td> 1186 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1187 </tr> 1188 <tr height="26" style='height:15.60pt;'> 1189 <td class="xl67" x:str>入参object为nullptr</td> 1190 </tr> 1191 <tr height="26" style='height:15.60pt;'> 1192 <td class="xl67" x:str>入参utf8name为nullptr</td> 1193 </tr> 1194 <tr height="26" style='height:15.60pt;'> 1195 <td class="xl67" x:str>入参result为nullptr</td> 1196 </tr> 1197 <tr height="26" style='height:15.60pt;'> 1198 <td class="xl67" x:str>napi_object_expected</td> 1199 <td class="xl67" x:str>入参object不为js Object类型</td> 1200 </tr> 1201 <tr height="26" style='height:15.60pt;'> 1202 <td class="xl67" x:str>napi_pending_exception</td> 1203 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1204 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1205 </tr> 1206 <tr height="26" style='height:15.60pt;'> 1207 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_set_element</td> 1208 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>在给定Object的指定索引处,设置元素。</td> 1209 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1210 <td class="xl67" x:str>入参env为nullptr</td> 1211 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1212 </tr> 1213 <tr height="26" style='height:15.60pt;'> 1214 <td class="xl67" x:str>入参object为nullptr</td> 1215 </tr> 1216 <tr height="26" style='height:15.60pt;'> 1217 <td class="xl67" x:str>入参value为nullptr</td> 1218 </tr> 1219 <tr height="26" style='height:15.60pt;'> 1220 <td class="xl67" x:str>napi_object_expected</td> 1221 <td class="xl67" x:str>入参object不为js Object类型</td> 1222 </tr> 1223 <tr height="26" style='height:15.60pt;'> 1224 <td class="xl67" x:str>napi_pending_exception</td> 1225 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1226 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1227 </tr> 1228 <tr height="26" style='height:15.60pt;'> 1229 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_element</td> 1230 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取给定Object指定索引处的元素。</td> 1231 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1232 <td class="xl67" x:str>入参env为nullptr</td> 1233 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1234 </tr> 1235 <tr height="26" style='height:15.60pt;'> 1236 <td class="xl67" x:str>入参object为nullptr</td> 1237 </tr> 1238 <tr height="26" style='height:15.60pt;'> 1239 <td class="xl67" x:str>入参result为nullptr</td> 1240 </tr> 1241 <tr height="26" style='height:15.60pt;'> 1242 <td class="xl67" x:str>napi_object_expected</td> 1243 <td class="xl67" x:str>入参object不为js Object类型</td> 1244 </tr> 1245 <tr height="26" style='height:15.60pt;'> 1246 <td class="xl67" x:str>napi_pending_exception</td> 1247 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1248 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1249 </tr> 1250 <tr height="26" style='height:15.60pt;'> 1251 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_has_element</td> 1252 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>若给定Object的指定索引处拥有属性,获取该元素。</td> 1253 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1254 <td class="xl67" x:str>入参env为nullptr</td> 1255 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1256 </tr> 1257 <tr height="26" style='height:15.60pt;'> 1258 <td class="xl67" x:str>入参object为nullptr</td> 1259 </tr> 1260 <tr height="26" style='height:15.60pt;'> 1261 <td class="xl67" x:str>入参result为nullptr</td> 1262 </tr> 1263 <tr height="26" style='height:15.60pt;'> 1264 <td class="xl67" x:str>napi_object_expected</td> 1265 <td class="xl67" x:str>入参object不为js Object类型</td> 1266 </tr> 1267 <tr height="26" style='height:15.60pt;'> 1268 <td class="xl67" x:str>napi_pending_exception</td> 1269 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1270 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1271 </tr> 1272 <tr height="26" style='height:15.60pt;'> 1273 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_delete_element</td> 1274 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>尝试删除给定Object的指定索引处的元素。</td> 1275 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1276 <td class="xl67" x:str>入参env为nullptr</td> 1277 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1278 </tr> 1279 <tr height="26" style='height:15.60pt;'> 1280 <td class="xl67" x:str>入参object为nullptr</td> 1281 </tr> 1282 <tr height="26" style='height:15.60pt;'> 1283 <td class="xl67" x:str>napi_object_expected</td> 1284 <td class="xl67" x:str>入参object不为js Object类型</td> 1285 </tr> 1286 <tr height="26" style='height:15.60pt;'> 1287 <td class="xl67" x:str>napi_pending_exception</td> 1288 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1289 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1290 </tr> 1291 <tr height="26" style='height:15.60pt;'> 1292 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_define_properties</td> 1293 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>批量的向给定Object中定义属性。</td> 1294 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1295 <td class="xl67" x:str>入参env为nullptr</td> 1296 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1297 </tr> 1298 <tr height="26" style='height:15.60pt;'> 1299 <td class="xl67" x:str>入参object为nullptr</td> 1300 </tr> 1301 <tr height="26" style='height:15.60pt;'> 1302 <td class="xl67" x:str>入参properties为nullptr</td> 1303 </tr> 1304 <tr height="26" style='height:15.60pt;'> 1305 <td class="xl67" x:str>napi_object_expected</td> 1306 <td class="xl67" x:str>入参object不为js Object类型</td> 1307 </tr> 1308 <tr height="26" style='height:15.60pt;'> 1309 <td class="xl67" x:str>napi_name_expected</td> 1310 <td class="xl67" x:str>入参properties中的某个property没<span style='display:none;'>有设utf8name,且它的name既不是js String类型也不是js Symbol类型</span></td> 1311 </tr> 1312 <tr height="26" style='height:15.60pt;'> 1313 <td class="xl67" x:str>napi_pending_exception</td> 1314 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1315 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1316 </tr> 1317 <tr height="26" style='height:15.60pt;'> 1318 <td class="xl66" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_type_tag_object</td> 1319 <td class="xl66" rowspan="7" style='border-right:none;border-bottom:none;' x:str>将tag指针的值与Object关联。</td> 1320 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 1321 <td class="xl67" x:str>入参env为nullptr</td> 1322 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1323 </tr> 1324 <tr height="26" style='height:15.60pt;'> 1325 <td class="xl67" x:str>入参js_object为nullptr</td> 1326 </tr> 1327 <tr height="26" style='height:15.60pt;'> 1328 <td class="xl67" x:str>入参type_tag为nullptr</td> 1329 </tr> 1330 <tr height="26" style='height:15.60pt;'> 1331 <td class="xl67" x:str>js对象已被打过tag标记</td> 1332 <td class="xl67" x:str>js对象需未被打过标记</td> 1333 </tr> 1334 <tr height="26" style='height:15.60pt;'> 1335 <td class="xl67" x:str>调用过程中出现未捕获的js异常</td> 1336 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1337 </tr> 1338 <tr height="26" style='height:15.60pt;'> 1339 <td class="xl67" x:str>napi_object_expected</td> 1340 <td class="xl67" x:str>入参js_object不是js Object类型</td> 1341 <td class="xl67" x:str>确保入参正确</td> 1342 </tr> 1343 <tr height="26" style='height:15.60pt;'> 1344 <td class="xl67" x:str>napi_pending_exception</td> 1345 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1346 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1347 </tr> 1348 <tr height="26" style='height:15.60pt;'> 1349 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_check_object_type_tag</td> 1350 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>判断给定的tag指针是否被关联到了js Object上。</td> 1351 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1352 <td class="xl67" x:str>入参env为nullptr</td> 1353 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1354 </tr> 1355 <tr height="26" style='height:15.60pt;'> 1356 <td class="xl67" x:str>入参js_object为nullptr</td> 1357 </tr> 1358 <tr height="26" style='height:15.60pt;'> 1359 <td class="xl67" x:str>入参type_tag为nullptr</td> 1360 </tr> 1361 <tr height="26" style='height:15.60pt;'> 1362 <td class="xl67" x:str>入参result为nullptr</td> 1363 </tr> 1364 <tr height="26" style='height:15.60pt;'> 1365 <td class="xl67" x:str>napi_object_expected</td> 1366 <td class="xl67" x:str>入参js_object不是js Object类型</td> 1367 </tr> 1368 <tr height="26" style='height:15.60pt;'> 1369 <td class="xl67" x:str>napi_pending_exception</td> 1370 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1371 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1372 </tr> 1373 <tr height="26" style='height:15.60pt;'> 1374 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_call_function</td> 1375 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>在Native方法中调用js function,即native call js。</td> 1376 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1377 <td class="xl67" x:str>入参env为nullptr</td> 1378 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1379 </tr> 1380 <tr height="26" style='height:15.60pt;'> 1381 <td class="xl67" x:str>入参func为nullptr</td> 1382 </tr> 1383 <tr height="26" style='height:15.60pt;'> 1384 <td class="xl67" x:str>入参argc大于0且argv为nullptr</td> 1385 </tr> 1386 <tr height="26" style='height:15.60pt;'> 1387 <td class="xl67" x:str>napi_function_expected</td> 1388 <td class="xl67" x:str>入参func不为js Function类型</td> 1389 </tr> 1390 <tr height="26" style='height:15.60pt;'> 1391 <td class="xl67" x:str>napi_pending_exception</td> 1392 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1393 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1394 </tr> 1395 <tr height="26" style='height:15.60pt;'> 1396 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_function</td> 1397 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建native方法给js使用,以便于js call native。</td> 1398 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1399 <td class="xl67" x:str>入参env为nullptr</td> 1400 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1401 </tr> 1402 <tr height="26" style='height:15.60pt;'> 1403 <td class="xl67" x:str>入参cb为nullptr</td> 1404 </tr> 1405 <tr height="26" style='height:15.60pt;'> 1406 <td class="xl67" x:str>入参result为nullptr</td> 1407 </tr> 1408 <tr height="26" style='height:15.60pt;'> 1409 <td class="xl67" x:str>new c++对象失败</td> 1410 <td class="xl67" x:str>内存不足,检查是否有c++内存泄漏</td> 1411 </tr> 1412 <tr height="26" style='height:15.60pt;'> 1413 <td class="xl67" x:str>napi_pending_exception</td> 1414 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1415 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1416 </tr> 1417 <tr height="26" style='height:15.60pt;'> 1418 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_cb_info</td> 1419 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>从给定的callback info中获取有关调用的详细信息,如参<span style='display:none;'>数和this指针。</span></td> 1420 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1421 <td class="xl67" x:str>入参env为nullptr</td> 1422 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1423 </tr> 1424 <tr height="26" style='height:15.60pt;'> 1425 <td class="xl67" x:str>入参cbinfo为nullptr</td> 1426 </tr> 1427 <tr height="26" style='height:15.60pt;'> 1428 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_new_target</td> 1429 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取构造函数调用的new.target。</td> 1430 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1431 <td class="xl67" x:str>入参env为nullptr</td> 1432 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1433 </tr> 1434 <tr height="26" style='height:15.60pt;'> 1435 <td class="xl67" x:str>入参cbinfo为nullptr</td> 1436 </tr> 1437 <tr height="26" style='height:15.60pt;'> 1438 <td class="xl67" x:str>入参result为nullptr</td> 1439 </tr> 1440 <tr height="26" style='height:15.60pt;'> 1441 <td class="xl67" x:str>napi_pending_exception</td> 1442 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1443 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1444 </tr> 1445 <tr height="26" style='height:15.60pt;'> 1446 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_new_instance</td> 1447 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>通过给定的构造函数,构建一个实例。</td> 1448 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1449 <td class="xl67" x:str>入参env为nullptr</td> 1450 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1451 </tr> 1452 <tr height="26" style='height:15.60pt;'> 1453 <td class="xl67" x:str>入参constructor为nullptr</td> 1454 </tr> 1455 <tr height="26" style='height:15.60pt;'> 1456 <td class="xl67" x:str>入参argc大于0且argv为nullptr</td> 1457 </tr> 1458 <tr height="26" style='height:15.60pt;'> 1459 <td class="xl67" x:str>入参result为nullptr</td> 1460 </tr> 1461 <tr height="26" style='height:15.60pt;'> 1462 <td class="xl67" x:str>napi_function_expected</td> 1463 <td class="xl67" x:str>入参constructor不为js Function类<span style='display:none;'>型</span></td> 1464 </tr> 1465 <tr height="26" style='height:15.60pt;'> 1466 <td class="xl67" x:str>napi_pending_exception</td> 1467 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1468 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1469 </tr> 1470 <tr height="26" style='height:15.60pt;'> 1471 <td class="xl66" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_define_class</td> 1472 <td class="xl66" rowspan="7" style='border-right:none;border-bottom:none;' x:str>定义与C++类相对应的JavaScript类。</td> 1473 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 1474 <td class="xl67" x:str>入参env为nullptr</td> 1475 <td class="xl67" rowspan="6" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1476 </tr> 1477 <tr height="26" style='height:15.60pt;'> 1478 <td class="xl67" x:str>入参utf8name为nullptr</td> 1479 </tr> 1480 <tr height="26" style='height:15.60pt;'> 1481 <td class="xl67" x:str>入参constructor为nullptr</td> 1482 </tr> 1483 <tr height="26" style='height:15.60pt;'> 1484 <td class="xl67" x:str>入参property_count大于0且propert<span style='display:none;'>ies为nullptr</span></td> 1485 </tr> 1486 <tr height="26" style='height:15.60pt;'> 1487 <td class="xl67" x:str>入参result为nullptr</td> 1488 </tr> 1489 <tr height="26" style='height:15.60pt;'> 1490 <td class="xl67" x:str>napi_object_expected</td> 1491 <td class="xl67" x:str>入参length值不为NAPI_AUTO_LENGTH<span style='display:none;'>,但超过INT_MAX</span></td> 1492 </tr> 1493 <tr height="26" style='height:15.60pt;'> 1494 <td class="xl67" x:str>napi_pending_exception</td> 1495 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1496 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1497 </tr> 1498 <tr height="26" style='height:15.60pt;'> 1499 <td class="xl66" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_wrap</td> 1500 <td class="xl66" rowspan="6" style='border-right:none;border-bottom:none;' x:str>在js object上绑定一个native对象实例。</td> 1501 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1502 <td class="xl67" x:str>入参env为nullptr</td> 1503 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1504 </tr> 1505 <tr height="26" style='height:15.60pt;'> 1506 <td class="xl67" x:str>入参js_object为nullptr</td> 1507 </tr> 1508 <tr height="26" style='height:15.60pt;'> 1509 <td class="xl67" x:str>入参native_object为nullptr</td> 1510 </tr> 1511 <tr height="26" style='height:15.60pt;'> 1512 <td class="xl67" x:str>入参finalize_cb为nullptr</td> 1513 </tr> 1514 <tr height="26" style='height:15.60pt;'> 1515 <td class="xl67" x:str>napi_object_expected</td> 1516 <td class="xl67" x:str>入参js_object不是js Object类型</td> 1517 </tr> 1518 <tr height="26" style='height:15.60pt;'> 1519 <td class="xl67" x:str>napi_pending_exception</td> 1520 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1521 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1522 </tr> 1523 <tr height="26" style='height:15.60pt;'> 1524 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_unwrap</td> 1525 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>从js object上获取先前绑定的native对象实例。</td> 1526 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1527 <td class="xl67" x:str>入参env为nullptr</td> 1528 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1529 </tr> 1530 <tr height="26" style='height:15.60pt;'> 1531 <td class="xl67" x:str>入参js_object为nullptr</td> 1532 </tr> 1533 <tr height="26" style='height:15.60pt;'> 1534 <td class="xl67" x:str>入参result为nullptr</td> 1535 </tr> 1536 <tr height="26" style='height:15.60pt;'> 1537 <td class="xl67" x:str>napi_object_expected</td> 1538 <td class="xl67" x:str>入参js_object不是js Object类型</td> 1539 </tr> 1540 <tr height="26" style='height:15.60pt;'> 1541 <td class="xl67" x:str>napi_pending_exception</td> 1542 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1543 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1544 </tr> 1545 <tr height="26" style='height:15.60pt;'> 1546 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_remove_wrap</td> 1547 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>从js object上获取先前绑定的native对象实例,并解除绑定。</td> 1548 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1549 <td class="xl67" x:str>入参env为nullptr</td> 1550 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1551 </tr> 1552 <tr height="26" style='height:15.60pt;'> 1553 <td class="xl67" x:str>入参js_object为nullptr</td> 1554 </tr> 1555 <tr height="26" style='height:15.60pt;'> 1556 <td class="xl67" x:str>入参result为nullptr</td> 1557 </tr> 1558 <tr height="26" style='height:15.60pt;'> 1559 <td class="xl67" x:str>napi_object_expected</td> 1560 <td class="xl67" x:str>入参js_object不是js Object类型</td> 1561 </tr> 1562 <tr height="26" style='height:15.60pt;'> 1563 <td class="xl67" x:str>napi_pending_exception</td> 1564 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1565 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1566 </tr> 1567 <tr height="26" style='height:15.60pt;'> 1568 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_async_work</td> 1569 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建一个异步工作对象。</td> 1570 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 1571 <td class="xl67" x:str>入参env为nullptr</td> 1572 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1573 </tr> 1574 <tr height="26" style='height:15.60pt;'> 1575 <td class="xl67" x:str>入参async_resource_name为nullptr</td> 1576 </tr> 1577 <tr height="26" style='height:15.60pt;'> 1578 <td class="xl67" x:str>入参execute为nullptr</td> 1579 </tr> 1580 <tr height="26" style='height:15.60pt;'> 1581 <td class="xl67" x:str>入参complete为nullptr</td> 1582 </tr> 1583 <tr height="26" style='height:15.60pt;'> 1584 <td class="xl67" x:str>入参result为nullptr</td> 1585 </tr> 1586 <tr height="26" style='height:15.60pt;'> 1587 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_delete_async_work</td> 1588 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>释放先前创建的异步工作对象。</td> 1589 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1590 <td class="xl67" x:str>入参env为nullptr</td> 1591 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1592 </tr> 1593 <tr height="26" style='height:15.60pt;'> 1594 <td class="xl67" x:str>入参work为nullptr</td> 1595 </tr> 1596 <tr height="26" style='height:15.60pt;'> 1597 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_queue_async_work</td> 1598 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>将异步工作对象加到队列,由底层去调度执行。</td> 1599 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1600 <td class="xl67" x:str>入参env为nullptr</td> 1601 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1602 </tr> 1603 <tr height="26" style='height:15.60pt;'> 1604 <td class="xl67" x:str>入参work为nullptr</td> 1605 </tr> 1606 <tr height="26" style='height:15.60pt;'> 1607 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_cancel_async_work</td> 1608 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>取消入队的异步任务。</td> 1609 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1610 <td class="xl67" x:str>入参env为nullptr</td> 1611 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1612 </tr> 1613 <tr height="26" style='height:15.60pt;'> 1614 <td class="xl67" x:str>入参work为nullptr</td> 1615 </tr> 1616 <tr height="26" style='height:15.60pt;'> 1617 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_async_init</td> 1618 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>创建一个异步资源上下文环境(不支持与async_hook相关能力)。</td> 1619 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1620 <td class="xl67" x:str>入参env为nullptr</td> 1621 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1622 </tr> 1623 <tr height="26" style='height:15.60pt;'> 1624 <td class="xl67" x:str>入参async_resource_name为nullptr</td> 1625 </tr> 1626 <tr height="26" style='height:15.60pt;'> 1627 <td class="xl67" x:str>入参result为nullptr</td> 1628 </tr> 1629 <tr height="26" style='height:15.60pt;'> 1630 <td class="xl66" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_make_callback</td> 1631 <td class="xl66" rowspan="7" style='border-right:none;border-bottom:none;' x:str>在异步资源上下文环境中回调JS函数(不支持与async_hook相关能力)。</td> 1632 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1633 <td class="xl67" x:str>入参env为nullptr</td> 1634 <td class="xl67" rowspan="6" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1635 </tr> 1636 <tr height="26" style='height:15.60pt;'> 1637 <td class="xl67" x:str>入参func为nullptr</td> 1638 </tr> 1639 <tr height="26" style='height:15.60pt;'> 1640 <td class="xl67" x:str>入参recv为nullptr</td> 1641 </tr> 1642 <tr height="26" style='height:15.60pt;'> 1643 <td class="xl67" x:str>入参argc大于0且argv为nullptr</td> 1644 </tr> 1645 <tr height="26" style='height:15.60pt;'> 1646 <td class="xl67" x:str>napi_object_expected</td> 1647 <td class="xl67" x:str>入参recv不为js Object类型</td> 1648 </tr> 1649 <tr height="26" style='height:15.60pt;'> 1650 <td class="xl67" x:str>napi_function_expected</td> 1651 <td class="xl67" x:str>入参func不为js Function类型</td> 1652 </tr> 1653 <tr height="26" style='height:15.60pt;'> 1654 <td class="xl67" x:str>napi_pending_exception</td> 1655 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1656 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1657 </tr> 1658 <tr height="26" style='height:15.60pt;'> 1659 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_async_destroy</td> 1660 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>销毁先前创建的异步资源上下文环境(不支持与async_hook<span style='display:none;'>相关能力)。</span></td> 1661 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1662 <td class="xl67" x:str>入参env为nullptr</td> 1663 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1664 </tr> 1665 <tr height="26" style='height:15.60pt;'> 1666 <td class="xl67" x:str>入参async_context为nullptr</td> 1667 </tr> 1668 <tr height="26" style='height:15.60pt;'> 1669 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_open_callback_scope</td> 1670 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建一个回调作用域(不支持与async_hook相关能力)。</td> 1671 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1672 <td class="xl67" x:str>入参env为nullptr</td> 1673 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1674 </tr> 1675 <tr height="26" style='height:15.60pt;'> 1676 <td class="xl67" x:str>入参result为nullptr</td> 1677 </tr> 1678 <tr height="26" style='height:15.60pt;'> 1679 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_close_callback_scope</td> 1680 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>关闭先前创建的回调作用域(不支持与async_hook相关能力)。</td> 1681 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1682 <td class="xl67" x:str>入参env为nullptr</td> 1683 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1684 </tr> 1685 <tr height="26" style='height:15.60pt;'> 1686 <td class="xl67" x:str>入参scope为nullptr</td> 1687 </tr> 1688 <tr height="26" style='height:15.60pt;'> 1689 <td class="xl67" x:str>new c++对象失败</td> 1690 <td class="xl67" x:str>内存不足,检查是否有c++内存泄漏</td> 1691 </tr> 1692 <tr height="26" style='height:15.60pt;'> 1693 <td class="xl67" x:str>napi_callback_scope_mismatch</td> 1694 <td class="xl67" x:str>napi_open_callback_scope调用次数<span style='display:none;'>小于napi_close_callback_scope</span></td> 1695 <td class="xl67" x:str>napi_open_callback_scope和napi_cl<span style='display:none;'>ose_callback_scope需要成对使用</span></td> 1696 </tr> 1697 <tr height="26" style='height:15.60pt;'> 1698 <td class="xl66" height="26" style='height:15.60pt;' x:str>napi_get_node_version</td> 1699 <td class="xl66" x:str>获取node的版本信息。</td> 1700 <td class="xl67" x:str>不涉及</td> 1701 <td class="xl67" x:str>不涉及</td> 1702 <td class="xl67" x:str>不涉及</td> 1703 </tr> 1704 <tr height="26" style='height:15.60pt;'> 1705 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_version</td> 1706 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取Node运行时支持的最高 N-API 版本。</td> 1707 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1708 <td class="xl67" x:str>入参env为nullptr</td> 1709 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1710 </tr> 1711 <tr height="26" style='height:15.60pt;'> 1712 <td class="xl67" x:str>入参result为nullptr</td> 1713 </tr> 1714 <tr height="26" style='height:15.60pt;'> 1715 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_create_promise</td> 1716 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>创建一个延迟对象和js promise。</td> 1717 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1718 <td class="xl67" x:str>入参env为nullptr</td> 1719 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1720 </tr> 1721 <tr height="26" style='height:15.60pt;'> 1722 <td class="xl67" x:str>入参deferred为nullptr</td> 1723 </tr> 1724 <tr height="26" style='height:15.60pt;'> 1725 <td class="xl67" x:str>入参promise为nullptr</td> 1726 </tr> 1727 <tr height="26" style='height:15.60pt;'> 1728 <td class="xl67" x:str>napi_pending_exception</td> 1729 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1730 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1731 </tr> 1732 <tr height="26" style='height:15.60pt;'> 1733 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_resolve_deferred</td> 1734 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>resolve与js promise对象关联的延迟函数。</td> 1735 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1736 <td class="xl67" x:str>入参env为nullptr</td> 1737 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1738 </tr> 1739 <tr height="26" style='height:15.60pt;'> 1740 <td class="xl67" x:str>入参deferred为nullptr</td> 1741 </tr> 1742 <tr height="26" style='height:15.60pt;'> 1743 <td class="xl67" x:str>入参resolution为nullptr</td> 1744 </tr> 1745 <tr height="26" style='height:15.60pt;'> 1746 <td class="xl67" x:str>napi_pending_exception</td> 1747 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1748 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1749 </tr> 1750 <tr height="26" style='height:15.60pt;'> 1751 <td class="xl66" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_reject_deferred</td> 1752 <td class="xl66" rowspan="4" style='border-right:none;border-bottom:none;' x:str>reject与js promise对象关联的延迟函数。</td> 1753 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1754 <td class="xl67" x:str>入参env为nullptr</td> 1755 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1756 </tr> 1757 <tr height="26" style='height:15.60pt;'> 1758 <td class="xl67" x:str>入参deferred为nullptr</td> 1759 </tr> 1760 <tr height="26" style='height:15.60pt;'> 1761 <td class="xl67" x:str>入参rejection为nullptr</td> 1762 </tr> 1763 <tr height="26" style='height:15.60pt;'> 1764 <td class="xl67" x:str>napi_pending_exception</td> 1765 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 1766 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1767 </tr> 1768 <tr height="26" style='height:15.60pt;'> 1769 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_promise</td> 1770 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否为promise对象。</td> 1771 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1772 <td class="xl67" x:str>入参env为nullptr</td> 1773 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1774 </tr> 1775 <tr height="26" style='height:15.60pt;'> 1776 <td class="xl67" x:str>入参value为nullptr</td> 1777 </tr> 1778 <tr height="26" style='height:15.60pt;'> 1779 <td class="xl67" x:str>入参is_promise为nullptr</td> 1780 </tr> 1781 <tr height="26" style='height:15.60pt;'> 1782 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_get_uv_event_loop</td> 1783 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取当前libuv loop实例。</td> 1784 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1785 <td class="xl67" x:str>入参env为nullptr</td> 1786 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1787 </tr> 1788 <tr height="26" style='height:15.60pt;'> 1789 <td class="xl67" x:str>入参loop为nullptr</td> 1790 </tr> 1791 <tr height="26" style='height:15.60pt;'> 1792 <td class="xl67" x:str>napi_generic_failure</td> 1793 <td class="xl67" x:str>入参env已销毁</td> 1794 </tr> 1795 <tr height="26" style='height:15.60pt;'> 1796 <td class="xl66" height="208" rowspan="8" style='height:124.80pt;border-right:none;border-bottom:none;' x:str>napi_create_threadsafe_function</td> 1797 <td class="xl66" rowspan="8" style='border-right:none;border-bottom:none;' x:str>创建线程安全函数。</td> 1798 <td class="xl67" rowspan="6" x:str>napi_invalid_arg</td> 1799 <td class="xl67" x:str>入参env为nullptr</td> 1800 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1801 </tr> 1802 <tr height="26" style='height:15.60pt;'> 1803 <td class="xl67" x:str>入参async_resource_name为nullptr</td> 1804 </tr> 1805 <tr height="26" style='height:15.60pt;'> 1806 <td class="xl67" x:str>入参initial_thread_count为0或者<span style='display:none;'>大于128</span></td> 1807 </tr> 1808 <tr height="26" style='height:15.60pt;'> 1809 <td class="xl67" x:str>入参result为nullptr</td> 1810 </tr> 1811 <tr height="26" style='height:15.60pt;'> 1812 <td class="xl67" x:str>入参func与call_js_cb都为nullptr</td> 1813 </tr> 1814 <tr height="26" style='height:15.60pt;'> 1815 <td class="xl67" x:str>new c++对象失败</td> 1816 <td class="xl67" x:str>内存不足,检查是否有c++内存泄漏</td> 1817 </tr> 1818 <tr height="26" style='height:15.60pt;'> 1819 <td class="xl67" rowspan="2" x:str>napi_generic_failure</td> 1820 <td class="xl67" x:str>uv_loop_t为nullptr</td> 1821 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>NA</td> 1822 </tr> 1823 <tr height="26" style='height:15.60pt;'> 1824 <td class="xl67" x:str>uv_async_init失败</td> 1825 </tr> 1826 <tr height="26" style='height:15.60pt;'> 1827 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_threadsafe_function_context</td> 1828 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>获取线程安全函数中的context。</td> 1829 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1830 <td class="xl67" x:str>入参func为nullptr</td> 1831 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1832 </tr> 1833 <tr height="26" style='height:15.60pt;'> 1834 <td class="xl67" x:str>入参result为nullptr</td> 1835 </tr> 1836 <tr height="26" style='height:15.60pt;'> 1837 <td class="xl66" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_call_threadsafe_function</td> 1838 <td class="xl66" rowspan="7" style='border-right:none;border-bottom:none;' x:str>调用线程安全函数。</td> 1839 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1840 <td class="xl67" x:str>入参func为nullptr</td> 1841 <td class="xl67" x:str>确保入参正确</td> 1842 </tr> 1843 <tr height="26" style='height:15.60pt;'> 1844 <td class="xl67" x:str>threadsafe_function已关闭</td> 1845 <td class="xl67" x:str>请勿在napi_release_threadsafe_fun<span style='display:none;'>ction关闭了func后再调用本接口</span></td> 1846 </tr> 1847 <tr height="26" style='height:15.60pt;'> 1848 <td class="xl67" x:str>napi_queue_full</td> 1849 <td class="xl67" x:str>入参is_blocking为napi_tsfn_nonbl<span style='display:none;'>ocking且queue已满</span></td> 1850 <td class="xl67" x:str>增大max_queue_size大小。或is_bloc<span style='display:none;'>king改为napi_tsfn_blocking</span></td> 1851 </tr> 1852 <tr height="26" style='height:15.60pt;'> 1853 <td class="xl67" rowspan="2" x:str>napi_closing</td> 1854 <td class="xl67" x:str>threadsafe_function正在关闭</td> 1855 <td class="xl67" x:str>请勿在napi_release_threadsafe_fun<span style='display:none;'>ction关闭了func后再调用本接口</span></td> 1856 </tr> 1857 <tr height="26" style='height:15.60pt;'> 1858 <td class="xl67" x:str>入参env已销毁,且env地址又被新en<span style='display:none;'>v复用</span></td> 1859 <td class="xl67" x:str>请勿在env销毁后再使用本接口</td> 1860 </tr> 1861 <tr height="26" style='height:15.60pt;'> 1862 <td class="xl67" rowspan="2" x:str>napi_generic_failure</td> 1863 <td class="xl67" x:str>uv_async_send失败</td> 1864 <td class="xl67" x:str>NA</td> 1865 </tr> 1866 <tr height="26" style='height:15.60pt;'> 1867 <td class="xl67" x:str>入参env已销毁</td> 1868 <td class="xl67" x:str>请勿在env销毁后再使用本接口</td> 1869 </tr> 1870 <tr height="26" style='height:15.60pt;'> 1871 <td class="xl66" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_acquire_threadsafe_function</td> 1872 <td class="xl66" rowspan="2" style='border-right:none;border-bottom:none;' x:str>指示线程安全函数可以开始使用。</td> 1873 <td class="xl67" x:str>napi_invalid_arg</td> 1874 <td class="xl67" x:str>入参func为nullptr</td> 1875 <td class="xl67" x:str>确保入参正确</td> 1876 </tr> 1877 <tr height="26" style='height:15.60pt;'> 1878 <td class="xl67" x:str>napi_generic_failure</td> 1879 <td class="xl67" x:str>threadsafe_function正在关闭/已关<span style='display:none;'>闭</span></td> 1880 <td class="xl67" x:str>请勿在napi_release_threadsafe_fun<span style='display:none;'>ction关闭了func后再调用本接口</span></td> 1881 </tr> 1882 <tr height="26" style='height:15.60pt;'> 1883 <td class="xl66" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_release_threadsafe_function</td> 1884 <td class="xl66" rowspan="5" style='border-right:none;border-bottom:none;' x:str>指示线程安全函数将停止使用。</td> 1885 <td class="xl67" x:str>napi_invalid_arg</td> 1886 <td class="xl67" x:str>入参func为nullptr</td> 1887 <td class="xl67" x:str>确保入参正确</td> 1888 </tr> 1889 <tr height="26" style='height:15.60pt;'> 1890 <td class="xl67" rowspan="4" x:str>napi_generic_failure</td> 1891 <td class="xl67" x:str>threadsafe_function正在关闭/已关<span style='display:none;'>闭</span></td> 1892 <td class="xl67" x:str>请勿在napi_release_threadsafe_fun<span style='display:none;'>ction关闭了func后再调用本接口</span></td> 1893 </tr> 1894 <tr height="26" style='height:15.60pt;'> 1895 <td class="xl67" x:str>调用本接口时,占用threadsafe_fun<span style='display:none;'>ction的线程数是0</span></td> 1896 <td class="xl67" x:str>release次数需要与initial_thread_c<span style='display:none;'>ount和aquire匹配</span></td> 1897 </tr> 1898 <tr height="26" style='height:15.60pt;'> 1899 <td class="xl67" x:str>uv_async_send失败</td> 1900 <td class="xl67" x:str>NA</td> 1901 </tr> 1902 <tr height="26" style='height:15.60pt;'> 1903 <td class="xl67" x:str>入参env已销毁</td> 1904 <td class="xl67" x:str>确保入参正确</td> 1905 </tr> 1906 <tr height="26" style='height:15.60pt;'> 1907 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_ref_threadsafe_function</td> 1908 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>指示在主线程上运行的事件循环在线程安全函数被销毁之前不应退出。</td> 1909 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1910 <td class="xl67" x:str>入参env为nullptr</td> 1911 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1912 </tr> 1913 <tr height="26" style='height:15.60pt;'> 1914 <td class="xl67" x:str>入参func为nullptr</td> 1915 </tr> 1916 <tr height="26" style='height:15.60pt;'> 1917 <td class="xl67" x:str>napi_generic_failure</td> 1918 <td class="xl67" x:str>当前线程不是env所在线程</td> 1919 <td class="xl67" x:str>该接口只能从env所在线程调用</td> 1920 </tr> 1921 <tr height="26" style='height:15.60pt;'> 1922 <td class="xl66" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_unref_threadsafe_function</td> 1923 <td class="xl66" rowspan="3" style='border-right:none;border-bottom:none;' x:str>指示在主线程上运行的事件循环可能会在线程安全函数被销毁之前退出。</td> 1924 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1925 <td class="xl67" x:str>入参env为nullptr</td> 1926 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1927 </tr> 1928 <tr height="26" style='height:15.60pt;'> 1929 <td class="xl67" x:str>入参func为nullptr</td> 1930 </tr> 1931 <tr height="26" style='height:15.60pt;'> 1932 <td class="xl67" x:str>napi_generic_failure</td> 1933 <td class="xl67" x:str>当前线程不是env所在线程</td> 1934 <td class="xl67" x:str>该接口只能从env所在线程调用</td> 1935 </tr> 1936 <tr height="26" style='height:15.60pt;'> 1937 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_create_date</td> 1938 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>通过一个C的double数据创建js Date。</td> 1939 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1940 <td class="xl67" x:str>入参env为nullptr</td> 1941 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1942 </tr> 1943 <tr height="26" style='height:15.60pt;'> 1944 <td class="xl67" x:str>入参result为nullptr</td> 1945 </tr> 1946 <tr height="26" style='height:15.60pt;'> 1947 <td class="xl67" x:str>napi_pending_exception</td> 1948 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1949 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1950 </tr> 1951 <tr height="26" style='height:15.60pt;'> 1952 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_date_value</td> 1953 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取给定js Date对应的C double值。</td> 1954 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 1955 <td class="xl67" x:str>入参env为nullptr</td> 1956 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1957 </tr> 1958 <tr height="26" style='height:15.60pt;'> 1959 <td class="xl67" x:str>入参value为nullptr</td> 1960 </tr> 1961 <tr height="26" style='height:15.60pt;'> 1962 <td class="xl67" x:str>入参result为nullptr</td> 1963 </tr> 1964 <tr height="26" style='height:15.60pt;'> 1965 <td class="xl67" x:str>napi_date_expected</td> 1966 <td class="xl67" x:str>入参value不为js Date类型</td> 1967 </tr> 1968 <tr height="26" style='height:15.60pt;'> 1969 <td class="xl67" x:str>napi_pending_exception</td> 1970 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 1971 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 1972 </tr> 1973 <tr height="26" style='height:15.60pt;'> 1974 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_bigint_int64</td> 1975 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的int64数据创建js BigInt。</td> 1976 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1977 <td class="xl67" x:str>入参env为nullptr</td> 1978 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1979 </tr> 1980 <tr height="26" style='height:15.60pt;'> 1981 <td class="xl67" x:str>入参result为nullptr</td> 1982 </tr> 1983 <tr height="26" style='height:15.60pt;'> 1984 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_bigint_uint64</td> 1985 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>通过一个C的uint64数据创建js BigInt。</td> 1986 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 1987 <td class="xl67" x:str>入参env为nullptr</td> 1988 <td class="xl67" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1989 </tr> 1990 <tr height="26" style='height:15.60pt;'> 1991 <td class="xl67" x:str>入参result为nullptr</td> 1992 </tr> 1993 <tr height="26" style='height:15.60pt;'> 1994 <td class="xl69" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_create_bigint_words</td> 1995 <td class="xl69" rowspan="6" style='border-right:none;border-bottom:none;' x:str>通过一个C的uint64数组创建单个js BigInt。</td> 1996 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 1997 <td class="xl67" x:str>入参env为nullptr</td> 1998 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 1999 </tr> 2000 <tr height="26" style='height:15.60pt;'> 2001 <td class="xl67" x:str>入参words为nullptr</td> 2002 </tr> 2003 <tr height="26" style='height:15.60pt;'> 2004 <td class="xl67" x:str>入参result为nullptr</td> 2005 </tr> 2006 <tr height="26" style='height:15.60pt;'> 2007 <td class="xl67" x:str>入参word_count大于等于INT_MAX</td> 2008 </tr> 2009 <tr height="26" style='height:15.60pt;'> 2010 <td class="xl67" rowspan="2" x:str>napi_pending_exception</td> 2011 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 2012 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2013 </tr> 2014 <tr height="26" style='height:15.60pt;'> 2015 <td class="xl67" x:str>入参(word_count*2)>(1_MB/32)</td> 2016 <td class="xl67" x:str>确保入参正确</td> 2017 </tr> 2018 <tr height="26" style='height:15.60pt;'> 2019 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_value_bigint_int64</td> 2020 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取给定js BigInt对应的C int64值。</td> 2021 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 2022 <td class="xl67" x:str>入参env为nullptr</td> 2023 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2024 </tr> 2025 <tr height="26" style='height:15.60pt;'> 2026 <td class="xl67" x:str>入参value为nullptr</td> 2027 </tr> 2028 <tr height="26" style='height:15.60pt;'> 2029 <td class="xl67" x:str>入参result为nullptr</td> 2030 </tr> 2031 <tr height="26" style='height:15.60pt;'> 2032 <td class="xl67" x:str>入参lossless为nullptr</td> 2033 </tr> 2034 <tr height="26" style='height:15.60pt;'> 2035 <td class="xl67" x:str>napi_bigint_expected</td> 2036 <td class="xl67" x:str>入参value不为js BigInt类型</td> 2037 </tr> 2038 <tr height="26" style='height:15.60pt;'> 2039 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_get_value_bigint_uint64</td> 2040 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取给定js BigInt对应的C uint64值。</td> 2041 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 2042 <td class="xl67" x:str>入参env为nullptr</td> 2043 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2044 </tr> 2045 <tr height="26" style='height:15.60pt;'> 2046 <td class="xl67" x:str>入参value为nullptr</td> 2047 </tr> 2048 <tr height="26" style='height:15.60pt;'> 2049 <td class="xl67" x:str>入参result为nullptr</td> 2050 </tr> 2051 <tr height="26" style='height:15.60pt;'> 2052 <td class="xl67" x:str>入参lossless为nullptr</td> 2053 </tr> 2054 <tr height="26" style='height:15.60pt;'> 2055 <td class="xl67" x:str>napi_bigint_expected</td> 2056 <td class="xl67" x:str>入参value不为js BigInt类型</td> 2057 </tr> 2058 <tr height="26" style='height:15.60pt;'> 2059 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_get_value_bigint_words</td> 2060 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>获取给定js BigInt对应的信息,包括符号位、64位小端序数组和数组中的元素个数。</td> 2061 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 2062 <td class="xl67" x:str>入参env为nullptr</td> 2063 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2064 </tr> 2065 <tr height="26" style='height:15.60pt;'> 2066 <td class="xl67" x:str>入参value为nullptr</td> 2067 </tr> 2068 <tr height="26" style='height:15.60pt;'> 2069 <td class="xl67" x:str>入参word_count为nullptr</td> 2070 </tr> 2071 <tr height="26" style='height:15.60pt;'> 2072 <td class="xl67" x:str>napi_object_expected</td> 2073 <td class="xl67" x:str>入参value不为js BigInt类型</td> 2074 </tr> 2075 <tr height="26" style='height:15.60pt;'> 2076 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_buffer</td> 2077 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建并获取一个指定大小的js Buffer。</td> 2078 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 2079 <td class="xl67" x:str>入参env为nullptr</td> 2080 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2081 </tr> 2082 <tr height="26" style='height:15.60pt;'> 2083 <td class="xl67" x:str>入参data为nullptr</td> 2084 </tr> 2085 <tr height="26" style='height:15.60pt;'> 2086 <td class="xl67" x:str>入参result为nullptr</td> 2087 </tr> 2088 <tr height="26" style='height:15.60pt;'> 2089 <td class="xl67" x:str>入参size为0或超过2MiB(2097152)</td> 2090 </tr> 2091 <tr height="26" style='height:15.60pt;'> 2092 <td class="xl67" x:str>napi_pending_exception</td> 2093 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 2094 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2095 </tr> 2096 <tr height="26" style='height:15.60pt;'> 2097 <td class="xl69" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_create_buffer_copy</td> 2098 <td class="xl69" rowspan="6" style='border-right:none;border-bottom:none;' x:str>创建并获取一个指定大小的js Buffer,并以给定数据进行初始化。</td> 2099 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 2100 <td class="xl67" x:str>入参env为nullptr</td> 2101 <td class="xl67" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2102 </tr> 2103 <tr height="26" style='height:15.60pt;'> 2104 <td class="xl67" x:str>入参data为nullptr</td> 2105 </tr> 2106 <tr height="26" style='height:15.60pt;'> 2107 <td class="xl67" x:str>入参result_data为nullptr</td> 2108 </tr> 2109 <tr height="26" style='height:15.60pt;'> 2110 <td class="xl67" x:str>入参result为nullptr</td> 2111 </tr> 2112 <tr height="26" style='height:15.60pt;'> 2113 <td class="xl67" x:str>入参size为0或超过2MiB(2097152)</td> 2114 </tr> 2115 <tr height="26" style='height:15.60pt;'> 2116 <td class="xl67" x:str>napi_pending_exception</td> 2117 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 2118 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2119 </tr> 2120 <tr height="26" style='height:15.60pt;'> 2121 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_external_buffer</td> 2122 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建并获取一个指定大小的js Buffer,并以给定数据进行初始化,该接口可为Buffer附带额外数据。</td> 2123 <td class="xl67" rowspan="4" x:str>napi_invalid_arg</td> 2124 <td class="xl67" x:str>入参env为nullptr</td> 2125 <td class="xl67" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2126 </tr> 2127 <tr height="26" style='height:15.60pt;'> 2128 <td class="xl67" x:str>入参data为nullptr</td> 2129 </tr> 2130 <tr height="26" style='height:15.60pt;'> 2131 <td class="xl67" x:str>入参result为nullptr</td> 2132 </tr> 2133 <tr height="26" style='height:15.60pt;'> 2134 <td class="xl67" x:str>入参size为0或超过2MiB(2097152)</td> 2135 </tr> 2136 <tr height="26" style='height:15.60pt;'> 2137 <td class="xl67" x:str>napi_pending_exception</td> 2138 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2139 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2140 </tr> 2141 <tr height="26" style='height:15.60pt;'> 2142 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_get_buffer_info</td> 2143 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>获取js Buffer底层data及其长度。</td> 2144 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 2145 <td class="xl67" x:str>入参env为nullptr</td> 2146 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2147 </tr> 2148 <tr height="26" style='height:15.60pt;'> 2149 <td class="xl67" x:str>入参result为nullptr</td> 2150 </tr> 2151 <tr height="26" style='height:15.60pt;'> 2152 <td class="xl67" x:str>napi_arraybuffer_expected</td> 2153 <td class="xl67" x:str>入参value不为js ArrayBuffer类型</td> 2154 </tr> 2155 <tr height="26" style='height:15.60pt;'> 2156 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_buffer</td> 2157 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定js value是否为Buffer对象。</td> 2158 <td class="xl67" rowspan="3" x:str>napi_invalid_arg</td> 2159 <td class="xl67" x:str>入参env为nullptr</td> 2160 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2161 </tr> 2162 <tr height="26" style='height:15.60pt;'> 2163 <td class="xl67" x:str>入参value为nullptr</td> 2164 </tr> 2165 <tr height="26" style='height:15.60pt;'> 2166 <td class="xl67" x:str>入参result为nullptr</td> 2167 </tr> 2168 <tr height="26" style='height:15.60pt;'> 2169 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_object_freeze</td> 2170 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>冻结给定的对象。</td> 2171 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 2172 <td class="xl67" x:str>入参env为nullptr</td> 2173 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2174 </tr> 2175 <tr height="26" style='height:15.60pt;'> 2176 <td class="xl67" x:str>入参object为nullptr</td> 2177 </tr> 2178 <tr height="26" style='height:15.60pt;'> 2179 <td class="xl67" x:str>napi_object_expected</td> 2180 <td class="xl67" x:str>入参object不为js Object类型</td> 2181 </tr> 2182 <tr height="26" style='height:15.60pt;'> 2183 <td class="xl67" x:str>napi_pending_exception</td> 2184 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2185 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2186 </tr> 2187 <tr height="26" style='height:15.60pt;'> 2188 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_object_seal</td> 2189 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>密封给定的对象。</td> 2190 <td class="xl67" rowspan="2" x:str>napi_invalid_arg</td> 2191 <td class="xl67" x:str>入参env为nullptr</td> 2192 <td class="xl67" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2193 </tr> 2194 <tr height="26" style='height:15.60pt;'> 2195 <td class="xl67" x:str>入参object为nullptr</td> 2196 </tr> 2197 <tr height="26" style='height:15.60pt;'> 2198 <td class="xl67" x:str>napi_object_expected</td> 2199 <td class="xl67" x:str>入参object不为js Object类型</td> 2200 </tr> 2201 <tr height="26" style='height:15.60pt;'> 2202 <td class="xl67" x:str>napi_pending_exception</td> 2203 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2204 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2205 </tr> 2206 <tr height="26" style='height:15.60pt;'> 2207 <td class="xl69" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_get_all_property_names</td> 2208 <td class="xl69" rowspan="7" style='border-right:none;border-bottom:none;' x:str>获取一个数组,其中包含此对象过滤后的属性名称。</td> 2209 <td class="xl67" rowspan="5" x:str>napi_invalid_arg</td> 2210 <td class="xl67" x:str>入参env为nullptr</td> 2211 <td class="xl67" rowspan="6" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2212 </tr> 2213 <tr height="26" style='height:15.60pt;'> 2214 <td class="xl67" x:str>入参object为nullptr</td> 2215 </tr> 2216 <tr height="26" style='height:15.60pt;'> 2217 <td class="xl67" x:str>入参result为nullptr</td> 2218 </tr> 2219 <tr height="26" style='height:15.60pt;'> 2220 <td class="xl67" x:str>入参key_mode不在napi_key_collect<span style='display:none;'>ion_mode枚举范围内</span></td> 2221 </tr> 2222 <tr height="26" style='height:15.60pt;'> 2223 <td class="xl67" x:str>入参key_conversion不在napi_key_c<span style='display:none;'>onversion枚举范围内</span></td> 2224 </tr> 2225 <tr height="26" style='height:15.60pt;'> 2226 <td class="xl67" x:str>napi_object_expected</td> 2227 <td class="xl67" x:str>入参object不为js Object类型</td> 2228 </tr> 2229 <tr height="26" style='height:15.60pt;'> 2230 <td class="xl67" x:str>napi_pending_exception</td> 2231 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2232 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2233 </tr> 2234 <tr height="26" style='height:15.60pt;'> 2235 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_detach_arraybuffer</td> 2236 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>分离给定ArrayBuffer的底层数据。</td> 2237 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2238 <td class="xl67" x:str>入参env为nullptr</td> 2239 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2240 </tr> 2241 <tr height="26" style='height:15.60pt;'> 2242 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 2243 </tr> 2244 <tr height="26" style='height:15.60pt;'> 2245 <td class="xl67" x:str>入参arraybuffer是js Object类型,<span style='display:none;'>但不是js ArrayBuffer类型,也不是SharedArrayBuffer类型</span></td> 2246 </tr> 2247 <tr height="26" style='height:15.60pt;'> 2248 <td class="xl67" x:str>入参arraybuffer已被detach过</td> 2249 <td class="xl67" x:str>需arraybuffer未被detach过</td> 2250 </tr> 2251 <tr height="26" style='height:15.60pt;'> 2252 <td class="xl67" x:str>napi_object_expected</td> 2253 <td class="xl67" x:str>入参arraybuffer不为js Object类型</td> 2254 <td class="xl67" x:str>确保入参正确</td> 2255 </tr> 2256 <tr height="26" style='height:15.60pt;'> 2257 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_is_detached_arraybuffer</td> 2258 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>判断给定的ArrayBuffer是否已被分离过。</td> 2259 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2260 <td class="xl67" x:str>入参env为nullptr</td> 2261 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2262 </tr> 2263 <tr height="26" style='height:15.60pt;'> 2264 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 2265 </tr> 2266 <tr height="26" style='height:15.60pt;'> 2267 <td class="xl67" x:str>入参result为nullptr</td> 2268 </tr> 2269 <tr height="26" style='height:15.60pt;'> 2270 <td class="xl67" x:str>入参arraybuffer不为js ArrayBuffe<span style='display:none;'>r类型</span></td> 2271 </tr> 2272 <tr height="26" style='height:15.60pt;'> 2273 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_run_script</td> 2274 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将给定对象作为js代码运行。当前接口实际为空实现,可使用系统拓展接口napi_run_scr<span style='display:none;'>ipt_path接口,提升安全性。</span></td> 2275 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2276 <td class="xl67" x:str>入参env为nullptr</td> 2277 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2278 </tr> 2279 <tr height="26" style='height:15.60pt;'> 2280 <td class="xl67" x:str>入参script为nullptr</td> 2281 </tr> 2282 <tr height="26" style='height:15.60pt;'> 2283 <td class="xl67" x:str>入参result为nullptr</td> 2284 </tr> 2285 <tr height="26" style='height:15.60pt;'> 2286 <td class="xl66" height="26" style='height:15.60pt;' x:str>napi_set_instance_data</td> 2287 <td class="xl66" x:str>绑定与当前运行的环境相关联<span style='display:none;'>的数据项。</span></td> 2288 <td class="xl67" x:str>napi_invalid_arg</td> 2289 <td class="xl67" x:str>入参env为nullptr</td> 2290 <td class="xl67" x:str>确保入参正确</td> 2291 </tr> 2292 <tr height="26" style='height:15.60pt;'> 2293 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_get_instance_data</td> 2294 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>检索与当前运行的环境相关联的数据项。</td> 2295 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2296 <td class="xl67" x:str>入参env为nullptr</td> 2297 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2298 </tr> 2299 <tr height="26" style='height:15.60pt;'> 2300 <td class="xl67" x:str>入参data为nullptr</td> 2301 </tr> 2302 <tr height="26" style='height:15.60pt;'> 2303 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_add_env_cleanup_hook</td> 2304 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>注册环境清理钩子函数。</td> 2305 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2306 <td class="xl67" x:str>入参env为nullptr</td> 2307 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2308 </tr> 2309 <tr height="26" style='height:15.60pt;'> 2310 <td class="xl67" x:str>入参func为nullptr</td> 2311 </tr> 2312 <tr height="26" style='height:15.60pt;'> 2313 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_remove_env_cleanup_hook</td> 2314 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>取消环境清理钩子函数。</td> 2315 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2316 <td class="xl67" x:str>入参env为nullptr</td> 2317 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2318 </tr> 2319 <tr height="26" style='height:15.60pt;'> 2320 <td class="xl67" x:str>入参func为nullptr</td> 2321 </tr> 2322 <tr height="26" style='height:15.60pt;'> 2323 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_add_async_cleanup_hook</td> 2324 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>注册清理异步钩子函数。</td> 2325 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2326 <td class="xl67" x:str>入参env为nullptr</td> 2327 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2328 </tr> 2329 <tr height="26" style='height:15.60pt;'> 2330 <td class="xl67" x:str>入参hook为nullptr</td> 2331 </tr> 2332 <tr height="26" style='height:15.60pt;'> 2333 <td class="xl66" height="26" style='height:15.60pt;' x:str>napi_remove_async_cleanup_hook</td> 2334 <td class="xl66" x:str>取消清理异步钩子函数。</td> 2335 <td class="xl67" x:str>napi_invalid_arg</td> 2336 <td class="xl67" x:str>入参remove_handle为nullptr</td> 2337 <td class="xl67" x:str>确保入参正确</td> 2338 </tr> 2339 <tr height="26" style='height:15.60pt;'> 2340 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>node_api_get_module_file_name</td> 2341 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>用于获取加载项加载位置的绝对路径。</td> 2342 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2343 <td class="xl67" x:str>入参env为nullptr</td> 2344 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2345 </tr> 2346 <tr height="26" style='height:15.60pt;'> 2347 <td class="xl67" x:str>入参result为nullptr</td> 2348 </tr> 2349 <tr height="26" style='height:15.60pt;'> 2350 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_add_finalizer</td> 2351 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>当js Object中的对象被垃圾回收时调用注册的napi_finalize回调。</td> 2352 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2353 <td class="xl67" x:str>入参env为nullptr</td> 2354 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2355 </tr> 2356 <tr height="26" style='height:15.60pt;'> 2357 <td class="xl67" x:str>入参js_object为nullptr</td> 2358 </tr> 2359 <tr height="26" style='height:15.60pt;'> 2360 <td class="xl67" x:str>入参finalize_cb为nullptr</td> 2361 </tr> 2362 <tr height="26" style='height:15.60pt;'> 2363 <td class="xl67" x:str>napi_object_expected</td> 2364 <td class="xl67" x:str>入参js_object不是js Object类型</td> 2365 </tr> 2366 <tr height="26" style='height:15.60pt;'> 2367 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_fatal_exception</td> 2368 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>向js抛出 UncaughtException。</td> 2369 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2370 <td class="xl67" x:str>入参env为nullptr</td> 2371 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2372 </tr> 2373 <tr height="26" style='height:15.60pt;'> 2374 <td class="xl67" x:str>入参err为nullptr</td> 2375 </tr> 2376 <tr height="26" style='height:15.60pt;'> 2377 <td class="xl67" x:str>入参error不为js Error类型</td> 2378 </tr> 2379 <tr height="26" style='height:15.60pt;'> 2380 <td class="xl67" x:str>napi_pending_exception</td> 2381 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 2382 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2383 </tr> 2384 <tr height="26" style='height:15.60pt;'> 2385 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_queue_async_work_with_qos</td> 2386 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>将异步工作对象加到队列,由底层根据传入的qos优先级去<span style='display:none;'>调度执行。</span></td> 2387 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2388 <td class="xl67" x:str>入参env为nullptr</td> 2389 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2390 </tr> 2391 <tr height="26" style='height:15.60pt;'> 2392 <td class="xl67" x:str>入参work为nullptr</td> 2393 </tr> 2394 <tr height="26" style='height:15.60pt;'> 2395 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_run_script_path</td> 2396 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>运行abc文件。</td> 2397 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2398 <td class="xl67" x:str>入参env为nullptr</td> 2399 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2400 </tr> 2401 <tr height="26" style='height:15.60pt;'> 2402 <td class="xl67" x:str>入参result为nullptr</td> 2403 </tr> 2404 <tr height="26" style='height:15.60pt;'> 2405 <td class="xl67" x:str>napi_pending_exception</td> 2406 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2407 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2408 </tr> 2409 <tr height="26" style='height:15.60pt;'> 2410 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_load_module</td> 2411 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将abc文件作为模块加载,返回模块的命名空间。</td> 2412 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2413 <td class="xl67" x:str>入参env为nullptr</td> 2414 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2415 </tr> 2416 <tr height="26" style='height:15.60pt;'> 2417 <td class="xl67" x:str>入参result为nullptr</td> 2418 </tr> 2419 <tr height="26" style='height:15.60pt;'> 2420 <td class="xl67" x:str>napi_pending_exception</td> 2421 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2422 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2423 </tr> 2424 <tr height="26" style='height:15.60pt;'> 2425 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_object_with_properties</td> 2426 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>使用给定的napi_property_descriptor创建js Object。de<span style='display:none;'>scriptor的键名必须为 string,且不可转为number。</span></td> 2427 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2428 <td class="xl67" x:str>入参env为nullptr</td> 2429 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2430 </tr> 2431 <tr height="26" style='height:15.60pt;'> 2432 <td class="xl67" x:str>入参result为nullptr</td> 2433 </tr> 2434 <tr height="26" style='height:15.60pt;'> 2435 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_object_with_named_properties</td> 2436 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>使用给定的napi_value和键名创建js Object。键名必须为<span style='display:none;'><span style='mso-spacerun:yes;'> </span>string,且不可转为number。</span></td> 2437 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2438 <td class="xl67" x:str>入参env为nullptr</td> 2439 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2440 </tr> 2441 <tr height="26" style='height:15.60pt;'> 2442 <td class="xl67" x:str>入参result为nullptr</td> 2443 </tr> 2444 <tr height="26" style='height:15.60pt;'> 2445 <td class="xl69" height="208" rowspan="8" style='height:124.80pt;border-right:none;border-bottom:none;' x:str>napi_coerce_to_native_binding_object</td> 2446 <td class="xl69" rowspan="8" style='border-right:none;border-bottom:none;' x:str>强制将js Object和Native对象绑定。</td> 2447 <td class="xl71" rowspan="6" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2448 <td class="xl67" x:str>入参env为nullptr</td> 2449 <td class="xl71" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2450 </tr> 2451 <tr height="26" style='height:15.60pt;'> 2452 <td class="xl67" x:str>入参js_object为nullptr</td> 2453 </tr> 2454 <tr height="26" style='height:15.60pt;'> 2455 <td class="xl67" x:str>入参detach_cb为nullptr</td> 2456 </tr> 2457 <tr height="26" style='height:15.60pt;'> 2458 <td class="xl67" x:str>入参attach_cb为nullptr</td> 2459 </tr> 2460 <tr height="26" style='height:15.60pt;'> 2461 <td class="xl67" x:str>入参native_object为nullptr</td> 2462 </tr> 2463 <tr height="26" style='height:15.60pt;'> 2464 <td class="xl67" x:str>new c++对象失败</td> 2465 <td class="xl67" x:str>内存不足,检查是否有c++内存泄漏</td> 2466 </tr> 2467 <tr height="26" style='height:15.60pt;'> 2468 <td class="xl67" x:str>napi_object_expected</td> 2469 <td class="xl67" x:str>js_object不是js Object类型</td> 2470 <td class="xl67" x:str>确保入参正确</td> 2471 </tr> 2472 <tr height="26" style='height:15.60pt;'> 2473 <td class="xl67" x:str>napi_generic_failure</td> 2474 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2475 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2476 </tr> 2477 <tr height="26" style='height:15.60pt;'> 2478 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_create_ark_runtime</td> 2479 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>创建基础运行时环境。</td> 2480 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2481 <td class="xl67" x:str>g_createNapiEnvCallback为nullptr</td> 2482 <td class="xl67" x:str>NA</td> 2483 </tr> 2484 <tr height="26" style='height:15.60pt;'> 2485 <td class="xl67" x:str>入参env为nullptr</td> 2486 <td class="xl67" x:str>确保入参正确</td> 2487 </tr> 2488 <tr height="26" style='height:15.60pt;'> 2489 <td class="xl67" x:str>napi_create_ark_runtime_only<span style='display:none;'>_one_env_per_thread</span></td> 2490 <td class="xl67" x:str>当前线程以创建过env</td> 2491 <td class="xl67" x:str>避免重复创建</td> 2492 </tr> 2493 <tr height="26" style='height:15.60pt;'> 2494 <td class="xl67" x:str>napi_create_ark_runtime_too_<span style='display:none;'>many_envs</span></td> 2495 <td class="xl67" x:str>达到最大ArkRuntime数量(64)或js<span style='display:none;'>线程数超上限(80)</span></td> 2496 <td class="xl67" x:str>避免滥用接口</td> 2497 </tr> 2498 <tr height="26" style='height:15.60pt;'> 2499 <td class="xl67" x:str>napi_generic_failure</td> 2500 <td class="xl67" x:str>创建ark_runtime失败</td> 2501 <td class="xl67" x:str>根据hilog信息排查原因</td> 2502 </tr> 2503 <tr height="26" style='height:15.60pt;'> 2504 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_destroy_ark_runtime</td> 2505 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>销毁基础运行时环境。</td> 2506 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2507 <td class="xl67" x:str>g_createNapiEnvCallback为nullptr</td> 2508 <td class="xl67" x:str>NA</td> 2509 </tr> 2510 <tr height="26" style='height:15.60pt;'> 2511 <td class="xl67" x:str>入参env为nullptr</td> 2512 <td class="xl67" x:str>确保入参正确</td> 2513 </tr> 2514 <tr height="26" style='height:15.60pt;'> 2515 <td class="xl67" x:str>napi_destroy_ark_runtime_env<span style='display:none;'>_not_exist</span></td> 2516 <td class="xl67" x:str>env未创建</td> 2517 <td class="xl67" x:str>与create接口配套使用</td> 2518 </tr> 2519 <tr height="26" style='height:15.60pt;'> 2520 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_run_event_loop</td> 2521 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>触发底层的事件循环。</td> 2522 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2523 <td class="xl67" x:str>入参env为nullptr</td> 2524 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2525 </tr> 2526 <tr height="26" style='height:15.60pt;'> 2527 <td class="xl67" x:str>入参mode不为napi_event_mode枚举<span style='display:none;'>类型</span></td> 2528 </tr> 2529 <tr height="26" style='height:15.60pt;'> 2530 <td class="xl67" x:str>env的loop为nullptr</td> 2531 </tr> 2532 <tr height="26" style='height:15.60pt;'> 2533 <td class="xl67" x:str>napi_generic_failure</td> 2534 <td class="xl67" x:str>当前线程不是native线程</td> 2535 <td class="xl67" x:str>请使用napi_create_ark_runtime接口<span style='display:none;'>创建出来的env</span></td> 2536 </tr> 2537 <tr height="26" style='height:15.60pt;'> 2538 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_stop_event_loop</td> 2539 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>停止底层的事件循环。</td> 2540 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2541 <td class="xl67" x:str>入参env为nullptr</td> 2542 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2543 </tr> 2544 <tr height="26" style='height:15.60pt;'> 2545 <td class="xl67" x:str>env的loop为nullptr</td> 2546 </tr> 2547 <tr height="26" style='height:15.60pt;'> 2548 <td class="xl67" x:str>napi_generic_failure</td> 2549 <td class="xl67" x:str>当前线程不是native线程</td> 2550 <td class="xl67" x:str>请使用napi_create_ark_runtime接口<span style='display:none;'>创建出来的env</span></td> 2551 </tr> 2552 <tr height="26" style='height:15.60pt;'> 2553 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_load_module_with_info</td> 2554 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>将abc文件作为模块加载,返回模块的命名空间。可在新创建的ArkTS基础运行时环境中使用。</td> 2555 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2556 <td class="xl67" x:str>入参env为nullptr</td> 2557 <td class="xl73" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2558 </tr> 2559 <tr height="26" style='height:15.60pt;'> 2560 <td class="xl67" x:str>入参result为nullptr</td> 2561 </tr> 2562 <tr height="26" style='height:15.60pt;'> 2563 <td class="xl67" x:str>napi_generic_failure</td> 2564 <td class="xl67" x:str>模块加载失败</td> 2565 <td class="xl67" x:str>根据hilog信息排查原因</td> 2566 </tr> 2567 <tr height="26" style='height:15.60pt;'> 2568 <td class="xl67" x:str>napi_pending_exception</td> 2569 <td class="xl67" x:str>调用接口前有未捕获的js异常</td> 2570 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2571 </tr> 2572 <tr height="26" style='height:15.60pt;'> 2573 <td class="xl69" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_serialize</td> 2574 <td class="xl69" rowspan="7" style='border-right:none;border-bottom:none;' x:str>将ArkTS对象转换为native数据。</td> 2575 <td class="xl71" rowspan="7" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2576 <td class="xl67" x:str>入参env为nullptr</td> 2577 <td class="xl71" rowspan="7" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2578 </tr> 2579 <tr height="26" style='height:15.60pt;'> 2580 <td class="xl67" x:str>入参object为nullptr</td> 2581 </tr> 2582 <tr height="26" style='height:15.60pt;'> 2583 <td class="xl67" x:str>入参transfer_list为nullptr</td> 2584 </tr> 2585 <tr height="26" style='height:15.60pt;'> 2586 <td class="xl67" x:str>入参clone_list为nullptr</td> 2587 </tr> 2588 <tr height="26" style='height:15.60pt;'> 2589 <td class="xl67" x:str>入参result为nullptr</td> 2590 </tr> 2591 <tr height="26" style='height:15.60pt;'> 2592 <td class="xl67" x:str>入参transfer_list既不是undefined<span style='display:none;'>,也不是js Array</span></td> 2593 </tr> 2594 <tr height="26" style='height:15.60pt;'> 2595 <td class="xl67" x:str>入参clone_list既不是undefined,<span style='display:none;'>也不是js Array</span></td> 2596 </tr> 2597 <tr height="26" style='height:15.60pt;'> 2598 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_deserialize</td> 2599 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>将native数据转为ArkTS对象。</td> 2600 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2601 <td class="xl67" x:str>入参env为nullptr</td> 2602 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2603 </tr> 2604 <tr height="26" style='height:15.60pt;'> 2605 <td class="xl67" x:str>入参buffer为nullptr</td> 2606 </tr> 2607 <tr height="26" style='height:15.60pt;'> 2608 <td class="xl67" x:str>入参object为nullptr</td> 2609 </tr> 2610 <tr height="26" style='height:15.60pt;'> 2611 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_delete_serialization_data</td> 2612 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>删除序列化数据。</td> 2613 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2614 <td class="xl67" x:str>入参env为nullptr</td> 2615 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2616 </tr> 2617 <tr height="26" style='height:15.60pt;'> 2618 <td class="xl67" x:str>入参buffer为nullptr</td> 2619 </tr> 2620 <tr height="26" style='height:15.60pt;'> 2621 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_call_threadsafe_function_with_priority</td> 2622 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>将指定优先级和入队方式的任务投递到ArkTS主线程。</td> 2623 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2624 <td class="xl67" x:str>入参func为nullptr</td> 2625 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2626 </tr> 2627 <tr height="26" style='height:15.60pt;'> 2628 <td class="xl67" x:str>入参priority不为napi_task_priori<span style='display:none;'>ty枚举类型</span></td> 2629 </tr> 2630 <tr height="26" style='height:15.60pt;'> 2631 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_generic_failure</td> 2632 <td class="xl67" x:str>入参func非法</td> 2633 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>根据hilog信息排查原因</td> 2634 </tr> 2635 <tr height="26" style='height:15.60pt;'> 2636 <td class="xl67" x:str>EventHandler不支持或EventHandler<span style='display:none;'>执行失败</span></td> 2637 </tr> 2638 <tr height="26" style='height:15.60pt;'> 2639 <td class="xl69" height="78.00" rowspan="3" style='height:46.80pt;border-right:none;border-bottom:none;' x:str>napi_is_sendable</td> 2640 <td class="xl69" rowspan="3" style='border-right:none;border-bottom:none;' x:str>判断给定JS value是否是Sendable的。</td> 2641 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2642 <td class="xl67" x:str>入参env为nullptr</td> 2643 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2644 </tr> 2645 <tr height="26" style='height:15.60pt;'> 2646 <td class="xl67" x:str>入参value为nullptr</td> 2647 </tr> 2648 <tr height="26" style='height:15.60pt;'> 2649 <td class="xl67" x:str>入参result为nullptr</td> 2650 </tr> 2651 <tr height="26" style='height:15.60pt;'> 2652 <td class="xl69" height="182" rowspan="7" style='height:109.20pt;border-right:none;border-bottom:none;' x:str>napi_define_sendable_class</td> 2653 <td class="xl69" rowspan="7" style='border-right:none;border-bottom:none;' x:str>创建一个Sendable类。</td> 2654 <td class="xl71" rowspan="5" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2655 <td class="xl67" x:str>入参env为nullptr</td> 2656 <td class="xl71" rowspan="6" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2657 </tr> 2658 <tr height="26" style='height:15.60pt;'> 2659 <td class="xl67" x:str>入参utf8name为nullptr</td> 2660 </tr> 2661 <tr height="26" style='height:15.60pt;'> 2662 <td class="xl67" x:str>入参constructor为nullptr</td> 2663 </tr> 2664 <tr height="26" style='height:15.60pt;'> 2665 <td class="xl67" x:str>入参property_count大于0且入参pro<span style='display:none;'>perties为nullptr</span></td> 2666 </tr> 2667 <tr height="26" style='height:15.60pt;'> 2668 <td class="xl67" x:str>入参result为nullptr</td> 2669 </tr> 2670 <tr height="26" style='height:15.60pt;'> 2671 <td class="xl67" x:str>napi_object_expected</td> 2672 <td class="xl67" x:str>入参length值不为NAPI_AUTO_LENGTH<span style='display:none;'>,但超过INT_MAX</span></td> 2673 </tr> 2674 <tr height="26" style='height:15.60pt;'> 2675 <td class="xl67" x:str>napi_pending_exception</td> 2676 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2677 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2678 </tr> 2679 <tr height="26" style='height:15.60pt;'> 2680 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_sendable_object_with_properties</td> 2681 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>使用给定的napi_property_descriptor创建一个Sendable对<span style='display:none;'>象。</span></td> 2682 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2683 <td class="xl67" x:str>入参env为nullptr</td> 2684 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2685 </tr> 2686 <tr height="26" style='height:15.60pt;'> 2687 <td class="xl67" x:str>入参result为nullptr</td> 2688 </tr> 2689 <tr height="26" style='height:15.60pt;'> 2690 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_sendable_array</td> 2691 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建一个Sendable数组。</td> 2692 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2693 <td class="xl67" x:str>入参env为nullptr</td> 2694 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2695 </tr> 2696 <tr height="26" style='height:15.60pt;'> 2697 <td class="xl67" x:str>入参result为nullptr</td> 2698 </tr> 2699 <tr height="26" style='height:15.60pt;'> 2700 <td class="xl69" height="52" rowspan="2" style='height:31.20pt;border-right:none;border-bottom:none;' x:str>napi_create_sendable_array_with_length</td> 2701 <td class="xl69" rowspan="2" style='border-right:none;border-bottom:none;' x:str>创建一个指定长度的Sendable数组。</td> 2702 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2703 <td class="xl67" x:str>入参env为nullptr</td> 2704 <td class="xl71" rowspan="2" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2705 </tr> 2706 <tr height="26" style='height:15.60pt;'> 2707 <td class="xl67" x:str>入参result为nullptr</td> 2708 </tr> 2709 <tr height="26" style='height:15.60pt;'> 2710 <td class="xl69" height="104" rowspan="4" style='height:62.40pt;border-right:none;border-bottom:none;' x:str>napi_create_sendable_arraybuffer</td> 2711 <td class="xl69" rowspan="4" style='border-right:none;border-bottom:none;' x:str>创建一个Sendable ArrayBuffer。</td> 2712 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2713 <td class="xl67" x:str>入参env为nullptr</td> 2714 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2715 </tr> 2716 <tr height="26" style='height:15.60pt;'> 2717 <td class="xl67" x:str>入参data为nullptr</td> 2718 </tr> 2719 <tr height="26" style='height:15.60pt;'> 2720 <td class="xl67" x:str>入参result为nullptr</td> 2721 </tr> 2722 <tr height="26" style='height:15.60pt;'> 2723 <td class="xl67" x:str>napi_pending_exception</td> 2724 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2725 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2726 </tr> 2727 <tr height="26" style='height:15.60pt;'> 2728 <td class="xl69" height="156.00" rowspan="6" style='height:93.60pt;border-right:none;border-bottom:none;' x:str>napi_create_sendable_typedarray</td> 2729 <td class="xl69" rowspan="6" style='border-right:none;border-bottom:none;' x:str>创建一个Sendable TypedArray。</td> 2730 <td class="xl75" rowspan="4" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2731 <td class="xl67" x:str>入参env为nullptr</td> 2732 <td class="xl71" rowspan="5" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2733 </tr> 2734 <tr height="26" style='height:15.60pt;'> 2735 <td class="xl67" x:str>入参arraybuffer为nullptr</td> 2736 </tr> 2737 <tr height="26" style='height:15.60pt;'> 2738 <td class="xl67" x:str>入参result为nullptr</td> 2739 </tr> 2740 <tr height="26" style='height:15.60pt;'> 2741 <td class="xl67" x:str>入参type不为napi_typedarray_type<span style='display:none;'>类型</span></td> 2742 </tr> 2743 <tr height="26" style='height:15.60pt;'> 2744 <td class="xl67" x:str>napi_object_expected</td> 2745 <td class="xl67" x:str>入参arraybuffer不为SharedArrayBu<span style='display:none;'>ffer类型</span></td> 2746 </tr> 2747 <tr height="26" style='height:15.60pt;'> 2748 <td class="xl67" x:str>napi_pending_exception</td> 2749 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2750 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2751 </tr> 2752 <tr height="26" style='height:15.60pt;'> 2753 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_wrap_sendable</td> 2754 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>包裹一个native实例到ArkTS对象中。</td> 2755 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2756 <td class="xl67" x:str>入参env为nullptr</td> 2757 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2758 </tr> 2759 <tr height="26" style='height:15.60pt;'> 2760 <td class="xl67" x:str>入参js_object为nullptr</td> 2761 </tr> 2762 <tr height="26" style='height:15.60pt;'> 2763 <td class="xl67" x:str>入参native_object为nullptr</td> 2764 </tr> 2765 <tr height="26" style='height:15.60pt;'> 2766 <td class="xl67" x:str>napi_object_expected</td> 2767 <td class="xl67" x:str>入参js_object不是SendableObject<span style='display:none;'>类型</span></td> 2768 </tr> 2769 <tr height="26" style='height:15.60pt;'> 2770 <td class="xl67" x:str>napi_pending_exception</td> 2771 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2772 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2773 </tr> 2774 <tr height="26" style='height:15.60pt;'> 2775 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_wrap_sendable_with_size</td> 2776 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>包裹一个native实例到ArkTS对象中并指定大小。</td> 2777 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2778 <td class="xl67" x:str>入参env为nullptr</td> 2779 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2780 </tr> 2781 <tr height="26" style='height:15.60pt;'> 2782 <td class="xl67" x:str>入参js_object为nullptr</td> 2783 </tr> 2784 <tr height="26" style='height:15.60pt;'> 2785 <td class="xl67" x:str>入参native_object为nullptr</td> 2786 </tr> 2787 <tr height="26" style='height:15.60pt;'> 2788 <td class="xl67" x:str>napi_object_expected</td> 2789 <td class="xl67" x:str>入参js_object不是SendableObject<span style='display:none;'>类型</span></td> 2790 </tr> 2791 <tr height="26" style='height:15.60pt;'> 2792 <td class="xl67" x:str>napi_pending_exception</td> 2793 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2794 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2795 </tr> 2796 <tr height="26" style='height:15.60pt;'> 2797 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_unwrap_sendable</td> 2798 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>获取ArkTS对象包裹的native实例。</td> 2799 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2800 <td class="xl67" x:str>入参env为nullptr</td> 2801 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2802 </tr> 2803 <tr height="26" style='height:15.60pt;'> 2804 <td class="xl67" x:str>入参js_object为nullptr</td> 2805 </tr> 2806 <tr height="26" style='height:15.60pt;'> 2807 <td class="xl67" x:str>入参result为nullptr</td> 2808 </tr> 2809 <tr height="26" style='height:15.60pt;'> 2810 <td class="xl67" x:str>napi_object_expected</td> 2811 <td class="xl67" x:str>入参js_object不是SendableObject<span style='display:none;'>类型</span></td> 2812 </tr> 2813 <tr height="26" style='height:15.60pt;'> 2814 <td class="xl67" x:str>napi_pending_exception</td> 2815 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2816 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2817 </tr> 2818 <tr height="26" style='height:15.60pt;'> 2819 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_remove_wrap_sendable</td> 2820 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>移除并获取ArkTS对象包裹的native实例。</td> 2821 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2822 <td class="xl67" x:str>入参env为nullptr</td> 2823 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2824 </tr> 2825 <tr height="26" style='height:15.60pt;'> 2826 <td class="xl67" x:str>入参js_object为nullptr</td> 2827 </tr> 2828 <tr height="26" style='height:15.60pt;'> 2829 <td class="xl67" x:str>入参result为nullptr</td> 2830 </tr> 2831 <tr height="26" style='height:15.60pt;'> 2832 <td class="xl67" x:str>napi_object_expected</td> 2833 <td class="xl67" x:str>入参js_object不是SendableObject<span style='display:none;'>类型</span></td> 2834 </tr> 2835 <tr height="26" style='height:15.60pt;'> 2836 <td class="xl67" x:str>napi_pending_exception</td> 2837 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2838 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2839 </tr> 2840 <tr height="26" style='height:15.60pt;'> 2841 <td class="xl69" height="130" rowspan="5" style='height:78.00pt;border-right:none;border-bottom:none;' x:str>napi_wrap_enhance</td> 2842 <td class="xl69" rowspan="5" style='border-right:none;border-bottom:none;' x:str>在ArkTS对象上绑定一个Node-API模块对象实例并指定实例大小,开发者可以指定绑定的回调函数是否异步执行(若异步则需线程安全)。</td> 2843 <td class="xl71" rowspan="3" style='border-right:none;border-bottom:none;' x:str>napi_invalid_arg</td> 2844 <td class="xl67" x:str>入参env为nullptr</td> 2845 <td class="xl71" rowspan="4" style='border-right:none;border-bottom:none;' x:str>确保入参正确</td> 2846 </tr> 2847 <tr height="26" style='height:15.60pt;'> 2848 <td class="xl67" x:str>入参js_object为nullptr</td> 2849 </tr> 2850 <tr height="26" style='height:15.60pt;'> 2851 <td class="xl67" x:str>入参native_object为nullptr</td> 2852 </tr> 2853 <tr height="26" style='height:15.60pt;'> 2854 <td class="xl67" x:str>napi_object_expected</td> 2855 <td class="xl67" x:str>入参js_object不是js Object类型</td> 2856 </tr> 2857 <tr height="26" style='height:15.60pt;'> 2858 <td class="xl67" x:str>napi_pending_exception</td> 2859 <td class="xl67" x:str>调用该接口前或调用过程中出现未捕<span style='display:none;'>获的js异常</span></td> 2860 <td class="xl67" x:str>根据异常信息(hilog/crash栈)处理<span style='display:none;'>异常</span></td> 2861 </tr> 2862 </table> 2863