26 using std::placeholders::_1;
29 : tracker_(&heap_tracer_),
30 startup_options_(options),
32 &util::Clock::Instance, false) {}
45 const std::string& file)
const {
57 const std::string& path) {
60 auto callback = std::bind(
67 const std::string& path,
const uint8_t* data,
size_t data_size) {
71 static_cast<bool (*)(
const std::string&,
const uint8_t*,
size_t)
>(
73 auto callback = std::bind(run_script, path, data, data_size);
84 engine.isolate()->SetEmbedderHeapTracer(&heap_tracer_);
92 network_thread_.
Stop();
static std::string GetPathForStaticFile(const std::string &static_data_dir, bool is_bundle_relative, const std::string &file)
std::string GetPathForDynamicFile(const std::string &file) const
static std::string GetPathForDynamicFile(const std::string &dynamic_data_dir, const std::string &file)
std::function< void()> RunLoop
bool RunScript(const std::string &path)
std::string dynamic_data_dir
bool is_static_relative_to_bundle
std::string static_data_dir
std::shared_ptr< ThreadEvent< bool > > RunScript(const std::string &path)
JsManagerImpl(const JsManager::StartupOptions &options)
std::shared_ptr< ThreadEvent< impl::RetOf< Func > > > AddInternalTask(TaskPriority priority, const std::string &name, Func &&callback)
bool HasPendingWork() const
std::string GetPathForStaticFile(const std::string &file) const