MCPcopy Create free account
hub / github.com/Snapchat/Valdi / isInstanceOf

Function isInstanceOf

valdi/src/valdi/hermes/HermesJavaScriptContext.cpp:1015–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013 auto name = propertyNames->at(*_runtime, i);
1014
1015 JSPropertyNameRef propertyName;
1016
1017 if (name.isString()) {
1018 auto symbolId = hermes::vm::stringToSymbolID(*_runtime, hermes::vm::createPseudoHandle(name.getString()));
1019 if (!checkException(symbolId.getStatus(), exceptionTracker)) {
1020 return;
1021 }
1022 propertyName = toPropertyNameRef(symbolId.getValue());
1023 } else if (name.isNumber()) {
1024 auto strResult = hermes::vm::toString_RJS(*_runtime, _runtime->makeHandle(name));
1025 if (!checkException(strResult.getStatus(), exceptionTracker)) {
1026 return;
1027 }
1028 auto symbolId = hermes::vm::stringToSymbolID(*_runtime, std::move(strResult.getValue()));
1029 if (!checkException(symbolId.getStatus(), exceptionTracker)) {

Callers 1

getValueTypeMethod · 0.85

Calls 2

getStatusMethod · 0.80
getValueMethod · 0.65

Tested by

no test coverage detected