NOTE(rjaber): There are some bug in current compilation, and this is temp measure to avoid hitting assert / heap corruption / segfaults in the typescript VM
| 28 | // NOTE(rjaber): There are some bug in current compilation, and this is temp measure to avoid hitting assert / heap |
| 29 | // corruption / segfaults in the typescript VM |
| 30 | static set<std::string> decodeSkipList(const fs::path& skipListFile) { |
| 31 | auto skipListResult = DiskUtils::load(Path(skipListFile.string())); |
| 32 | if (!skipListResult) { |
| 33 | TEST262_LOG(cerr, "Failed to save file {} with error {}", skipListFile, skipListResult.error().getMessage()); |
| 34 | return {}; |
| 35 | } |
| 36 | const auto skipListData = skipListResult.moveValue(); |
| 37 | auto skipListValueResult = jsonToValue(skipListData.data(), skipListData.size()); |
| 38 | if (!skipListValueResult) { |
| 39 | TEST262_LOG( |
| 40 | cerr, "Failed to parse file {} with error {}", skipListFile, skipListValueResult.error().getMessage()); |
| 41 | return {}; |
| 42 | } |
| 43 | const auto skipListValue = skipListValueResult.moveValue(); |
| 44 | if (!skipListValue.isArray()) { |
| 45 | TEST262_LOG(cerr, "Parsed file {} expected top level array", skipListFile); |
| 46 | return {}; |
| 47 | } |
| 48 | |
| 49 | set<string> retval; |
| 50 | for (const auto& skip : *skipListValue.getArrayRef()) { |
| 51 | if (!skip.isString()) { |
| 52 | TEST262_LOG(cerr, "skip list element for {} is not a string", skipListFile); |
| 53 | } |
| 54 | |
| 55 | retval.insert(skip.toString()); |
| 56 | } |
| 57 | |
| 58 | return retval; |
| 59 | } |
| 60 | |
| 61 | static void decodeException(JSContext* ctx, std::string& errorType, std::string& errorDescription) { |
| 62 | JSValue exception_val; |
no test coverage detected