| 1013 | } |
| 1014 | |
| 1015 | static bool isInstanceOf(hermes::vm::Runtime& runtime, |
| 1016 | const hermes::vm::Handle<hermes::vm::JSObject>& jsObject, |
| 1017 | const hermes::vm::PinnedHermesValue* ctor) { |
| 1018 | auto callResult = hermes::vm::instanceOfOperator_RJS(runtime, jsObject, runtime.makeHandle(*ctor)); |
| 1019 | |
| 1020 | if (callResult.getStatus() == hermes::vm::ExecutionStatus::EXCEPTION) { |
| 1021 | runtime.clearThrownValue(); |
| 1022 | return false; |
| 1023 | } |
| 1024 | |
| 1025 | return callResult.getValue(); |
| 1026 | } |
| 1027 | |
| 1028 | ValueType HermesJavaScriptContext::getValueType(const JSValue& value) { |
| 1029 | auto* hermesValue = toPinnedHermesValue(value); |
no test coverage detected