| 156 | } |
| 157 | |
| 158 | void JavaScriptObject::setProperty(const std::string &name, jsi::Value value) { |
| 159 | auto runtime = runtimeHolder.lock(); |
| 160 | assert((runtime != nullptr) && "JS Runtime was used after deallocation"); |
| 161 | auto &rawRuntime = runtime->get(); |
| 162 | |
| 163 | jsObject->setProperty(rawRuntime, name.c_str(), value); |
| 164 | } |
| 165 | |
| 166 | void JavaScriptObject::unsetProperty(jni::alias_ref<jstring> name) { |
| 167 | auto runtime = runtimeHolder.lock(); |