| 1215 | static bool hasNativeState(hermes::vm::Runtime& runtime, const hermes::vm::Handle<hermes::vm::JSObject>& jsObject) { |
| 1216 | if (!canReceiveNativeState(jsObject.get())) { |
| 1217 | return false; |
| 1218 | } |
| 1219 | |
| 1220 | auto callResult = hermes::vm::JSObject::hasNamed( |
| 1221 | jsObject, runtime, hermes::vm::Predefined::getSymbolID(hermes::vm::Predefined::InternalPropertyNativeState)); |
| 1222 | if (callResult.getStatus() == hermes::vm::ExecutionStatus::EXCEPTION) { |
| 1223 | runtime.clearThrownValue(); |
| 1224 | return false; |
| 1225 | } |
| 1226 | |
| 1227 | return callResult.getValue(); |
| 1228 | } |
| 1229 | |
| 1230 | static bool isInstanceOf(hermes::vm::Runtime& runtime, |
| 1231 | const hermes::vm::Handle<hermes::vm::JSObject>& jsObject, |
nothing calls this directly
no test coverage detected