| 940 | |
| 941 | hermes::vm::ScopedNativeCallFrame callFrame(*_runtime, |
| 942 | static_cast<uint32_t>(callContext.getParameterSize()), |
| 943 | handle.getHermesValue(), |
| 944 | handle.getHermesValue(), |
| 945 | objHandle.getHermesValue()); |
| 946 | |
| 947 | auto callResult = doCall(callFrame, handle, callContext); |
| 948 | |
| 949 | if (!checkException(callResult.getStatus(), callContext.getExceptionTracker())) { |
| 950 | return newUndefined(); |
| 951 | } |
| 952 | |
| 953 | auto resultValue = callResult->get(); |
| 954 | return toJSValueRef(resultValue.isObject() ? resultValue : objHandle.getHermesValue()); |
| 955 | } |
| 956 | |
| 957 | void HermesJavaScriptContext::visitObjectPropertyNames(const JSValue& object, |
| 958 | JSExceptionTracker& exceptionTracker, |
| 959 | IJavaScriptPropertyNamesVisitor& visitor) { |
| 960 | hermes::vm::GCScope gcScope(*_runtime); |
| 961 | auto jsObject = toJSObject(object, exceptionTracker); |
| 962 | if (!jsObject) { |
| 963 | return; |
| 964 | } |
| 965 | |
| 966 | uint32_t beginIndex; |
| 967 | uint32_t endIndex; |
| 968 | auto result = hermes::vm::getForInPropertyNames(*_runtime, std::move(jsObject), beginIndex, endIndex); |