Fix symbol escaping in bloaty_treemap

All JS strings are now single-quoted, so double-quotes don't need
escaping. There are some symbols (in fullsymbols mode) that contain
single quotes, though - so escape those instead.

Change-Id: Ibdcca5634413c6a5e292f81503fbbf89f3d52b0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430040
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/tools/bloaty_treemap.py b/tools/bloaty_treemap.py
index 28eb469..a721b57 100755
--- a/tools/bloaty_treemap.py
+++ b/tools/bloaty_treemap.py
@@ -89,8 +89,8 @@
                 print("ERROR: Unexpected absolute path:\n" + filepath)
                 sys.exit(1)
 
-        # It's rare, but symbols can contain double-quotes (it's a valid C++ operator)
-        symbol = symbol.replace('"', '\\"')
+        # Symbols involving C++ lambdas can contain single quotes
+        symbol = symbol.replace("'", "\\'")
 
         # Ensure that we've added intermediate nodes for all portions of this file path
         add_path(filepath)