Skip to content

Commit

Permalink
Responding to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Dec 13, 2022
1 parent 71257e3 commit b346425
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ReanimatedHermesRuntime::ReanimatedHermesRuntime(
jsQueue->quitSynchronous();
#endif

#ifndef NDEBUG
#ifdef DEBUG
jsi::Value evalWithSourceMap = jsi::Function::createFromHostFunction(
*runtime_,
jsi::PropNameID::forAscii(*runtime_, "evalWithSourceMap"),
Expand All @@ -105,7 +105,7 @@ ReanimatedHermesRuntime::ReanimatedHermesRuntime(
});
runtime_->global().setProperty(
*runtime_, "evalWithSourceMap", evalWithSourceMap);
#endif
#endif // DEBUG
}

ReanimatedHermesRuntime::~ReanimatedHermesRuntime() {
Expand Down
6 changes: 3 additions & 3 deletions Common/cpp/SharedItems/Shareables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ CoreFunction::CoreFunction(
rnFunction_ = std::make_unique<jsi::Function>(workletObject.asFunction(rt));
functionBody_ =
workletObject.getProperty(rt, "asString").asString(rt).utf8(rt);
location_ =
"worklet_" +
location_ = "worklet_" +
std::to_string(
(int)workletObject.getProperty(rt, "__workletHash").getNumber());
(unsigned int)workletObject.getProperty(rt, "__workletHash")
.getNumber());
}

std::unique_ptr<jsi::Function> &CoreFunction::getFunction(jsi::Runtime &rt) {
Expand Down
4 changes: 2 additions & 2 deletions Common/cpp/Tools/RuntimeDecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void RuntimeDecorator::decorateRuntime(

rt.global().setProperty(rt, "global", rt.global());

#ifndef NDEBUG
#ifdef DEBUG
auto evalWithSourceUrl = [](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
Expand All @@ -55,7 +55,7 @@ void RuntimeDecorator::decorateRuntime(
jsi::PropNameID::forAscii(rt, "evalWithSourceUrl"),
1,
evalWithSourceUrl));
#endif
#endif // DEBUG

auto callback = [](jsi::Runtime &rt,
const jsi::Value &thisValue,
Expand Down

0 comments on commit b346425

Please sign in to comment.