Revert "Revert "Removed name string field from SkSLType""

This reverts commit 917fef7ba76b3f97d98f9bd1f99415a7e2710033.

Change-Id: I68aeff69cc59bdd185ac79465eaba7215c01413a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433176
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLRehydrator.cpp b/src/sksl/SkSLRehydrator.cpp
index cd74ca2..c4679ef 100644
--- a/src/sksl/SkSLRehydrator.cpp
+++ b/src/sksl/SkSLRehydrator.cpp
@@ -153,8 +153,9 @@
             } else {
                 name += "[" + to_string(count) + "]";
             }
+            skstd::string_view nameChars(*fSymbolTable->takeOwnershipOfString(std::move(name)));
             const Type* result = fSymbolTable->takeOwnershipOfSymbol(
-                    Type::MakeArrayType(name, *componentType, count));
+                    Type::MakeArrayType(nameChars, *componentType, count));
             this->addSymbol(id, result);
             return result;
         }
@@ -199,8 +200,9 @@
                 const Type* type = this->type();
                 fields.emplace_back(m, fieldName, type);
             }
+            skstd::string_view nameChars(*fSymbolTable->takeOwnershipOfString(std::move(name)));
             const Type* result = fSymbolTable->takeOwnershipOfSymbol(
-                    Type::MakeStructType(/*offset=*/-1, name, std::move(fields)));
+                    Type::MakeStructType(/*offset=*/-1, nameChars, std::move(fields)));
             this->addSymbol(id, result);
             return result;
         }