MCPcopy Create free account
hub / github.com/NativeScript/android / WrapModuleContent

Method WrapModuleContent

test-app/runtime/src/main/cpp/ModuleInternal.cpp:621–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621Local<String> ModuleInternal::WrapModuleContent(const string& path) {
622 TNSPERF();
623
624 string content = Runtime::GetRuntime(m_isolate)->ReadFileText(path);
625
626 // TODO: Use statically allocated buffer for better performance
627 string result(MODULE_PROLOGUE);
628 result.reserve(content.length() + 1024);
629 result += content;
630 result += MODULE_EPILOGUE;
631
632 return ArgConverter::ConvertToV8String(m_isolate, result);
633}
634
635ScriptCompiler::CachedData* ModuleInternal::TryLoadScriptCache(const std::string& path) {
636 TNSPERF();

Callers

nothing calls this directly

Calls 3

ReadFileTextMethod · 0.80
reserveMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected