| 1636 | } |
| 1637 | |
| 1638 | inline void Object::CheckCast(napi_env env, napi_value value) { |
| 1639 | NAPI_CHECK(value != nullptr, "Object::CheckCast", "empty value"); |
| 1640 | |
| 1641 | napi_valuetype type; |
| 1642 | napi_status status = napi_typeof(env, value, &type); |
| 1643 | NAPI_CHECK(status == napi_ok, "Object::CheckCast", "napi_typeof failed"); |
| 1644 | NAPI_INTERNAL_CHECK(type == napi_object || type == napi_function, |
| 1645 | "Object::CheckCast", |
| 1646 | "Expect napi_object or napi_function, but got %d.", |
| 1647 | type); |
| 1648 | } |
| 1649 | |
| 1650 | inline Object::Object() : TypeTaggable() {} |
| 1651 |
nothing calls this directly
no outgoing calls
no test coverage detected