1 #pragma once 2 3 #include <jsi/jsi.h> 4 #include <memory> 5 #include <string> 6 #include <unordered_map> 7 #include <vector> 8 #include "RuntimeManager.h" 9 #include "SharedParent.h" 10 #include "WorkletsCache.h" 11 12 using namespace facebook; 13 14 namespace reanimated { 15 16 class FrozenObject : public jsi::HostObject { 17 friend WorkletsCache; 18 friend void extractMutables( 19 jsi::Runtime &rt, 20 std::shared_ptr<ShareableValue> sv, 21 std::vector<std::shared_ptr<MutableValue>> &res); 22 23 private: 24 std::unordered_map<std::string, std::shared_ptr<ShareableValue>> map; 25 std::vector<std::string> namesOrder; 26 27 public: 28 FrozenObject( 29 jsi::Runtime &rt, 30 const jsi::Object &object, 31 RuntimeManager *runtimeManager); 32 jsi::Object shallowClone(jsi::Runtime &rt); 33 bool containsHostFunction = false; 34 }; 35 36 } // namespace reanimated 37