From 4ba294da4680813803ebdcf1b9f33d2641fb0e2c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 31 Aug 2023 07:43:39 -0700 Subject: [PATCH 1/2] Emsymbolizer: Handle 1-length source map entries --- emsymbolizer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emsymbolizer.py b/emsymbolizer.py index 1d4be4e1e3974..2d7649c7f9257 100755 --- a/emsymbolizer.py +++ b/emsymbolizer.py @@ -89,8 +89,12 @@ def get_sourceMappingURL_section(module): class WasmSourceMap(object): - # This implementation is derived from emscripten's sourcemap-support.js - Location = namedtuple('Location', ['source', 'line', 'column']) + class Location(object): + def __init__(self, source=None, line=0, column=0, func=None): + self.source = source + self.line = line + self.column = column + self.func = func def __init__(self): self.version = None From 5dc1d6f99fe53355897f4561a1769680b34a9b37 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 31 Aug 2023 07:45:52 -0700 Subject: [PATCH 2/2] flake8 --- emsymbolizer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/emsymbolizer.py b/emsymbolizer.py index 2d7649c7f9257..b2340b82e62fc 100755 --- a/emsymbolizer.py +++ b/emsymbolizer.py @@ -12,7 +12,6 @@ # If there is a name section or symbol table, llvm-nm can show the symbol name. import argparse -from collections import namedtuple import json import os import re