| 826 | return newUndefined(); |
| 827 | } |
| 828 | |
| 829 | return toJSValueRef(result.getValue().getHermesValue()); |
| 830 | } |
| 831 | |
| 832 | bool HermesJavaScriptContext::hasObjectProperty(const JSValue& object, const JSPropertyName& propertyName) { |
| 833 | hermes::vm::GCScope gcScope(*_runtime); |
| 834 | const auto* hermesValue = toPinnedHermesValue(object); |
| 835 | |
| 836 | if (!hermesValue->isObject()) { |
| 837 | return false; |
| 838 | } |
| 839 | |
| 840 | auto symbolId = toSymbolID(propertyName); |
| 841 | auto result = hermes::vm::JSObject::hasNamedOrIndexed( |
| 842 | hermes::vm::Handle<::hermes::vm::JSObject>::vmcast(hermesValue), *_runtime, symbolId.get()); |
| 843 | |
| 844 | if (result.getStatus() == hermes::vm::ExecutionStatus::EXCEPTION) { |
| 845 | _runtime->clearThrownValue(); |
| 846 | return false; |
| 847 | } |