Skip to content

Commit

Permalink
Rename createObjectWithShareableNativeState to createFromShareable
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Jan 13, 2025
1 parent e28abf3 commit 07de993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jsi::Value makeShareableClone(
throw std::runtime_error(
"[Reanimated] Attempted to convert an unsupported value type.");
}
return ShareableNativeState::createObjectWithShareableNativeState(rt, shareable);
return ShareableNativeState::createFromShareable(rt, shareable);
}

std::shared_ptr<Shareable> extractShareableOrThrow(
Expand Down Expand Up @@ -260,11 +260,11 @@ jsi::Value ShareableRemoteFunction::toJSValue(jsi::Runtime &rt) {
#ifndef NDEBUG
return getValueUnpacker(rt).call(
rt,
ShareableNativeState::createObjectWithShareableNativeState(rt, shared_from_this()),
ShareableNativeState::createFromShareable(rt, shared_from_this()),
jsi::String::createFromAscii(rt, "RemoteFunction"),
jsi::String::createFromUtf8(rt, name_));
#else
return ShareableNativeState::createObjectWithShareableNativeState(rt, shared_from_this());
return ShareableNativeState::createFromShareable(rt, shared_from_this());
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ShareableNativeState : public jsi::NativeState {
return shareable_;
}

static jsi::Object createObjectWithShareableNativeState(
static jsi::Object createFromShareable(
jsi::Runtime &rt,
const std::shared_ptr<Shareable> &value) {
jsi::Object obj(rt);
Expand Down

0 comments on commit 07de993

Please sign in to comment.