Skip to content

Commit 68d7fbf

Browse files
committed
Add missed JSI Version Macro
1 parent 813eee4 commit 68d7fbf

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

API/jsi/jsi/decorator.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
365365
const Value& value) override {
366366
plain_.setPropertyValue(o, name, value);
367367
}
368-
void setPropertyValue(JSI_CONST_10 Object& o, const String& name, const Value& value)
369-
override {
368+
void setPropertyValue(
369+
JSI_CONST_10 Object& o,
370+
const String& name,
371+
const Value& value) override {
370372
plain_.setPropertyValue(o, name, value);
371373
}
372374

API/jsi/jsi/instrumentation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ class JSI_EXPORT Instrumentation {
137137
virtual void writeBasicBlockProfileTraceToFile(
138138
const std::string& fileName) const = 0;
139139

140+
#if JSI_VERSION >= 21
140141
/// Write the opcode stats to the given stream.
141142
virtual void dumpOpcodeStats(std::ostream& os) const = 0;
143+
#endif
142144

143145
/// Dump external profiler symbols to the given file name.
144146
virtual void dumpProfilerSymbolsToFile(const std::string& fileName) const = 0;

API/jsi/jsi/jsi.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,18 @@ class JSI_EXPORT Runtime {
553553

554554
virtual Value getProperty(const Object&, const PropNameID& name) = 0;
555555
virtual Value getProperty(const Object&, const String& name) = 0;
556+
557+
#if JSI_VERSION >= 21
556558
virtual Value getProperty(const Object&, const Value& name);
559+
#endif
560+
557561
virtual bool hasProperty(const Object&, const PropNameID& name) = 0;
558562
virtual bool hasProperty(const Object&, const String& name) = 0;
563+
564+
#if JSI_VERSION >= 21
559565
virtual bool hasProperty(const Object&, const Value& name);
566+
#endif
567+
560568
virtual void setPropertyValue(
561569
JSI_CONST_10 Object&,
562570
const PropNameID& name,

0 commit comments

Comments
 (0)