Pass ByteStringView by value

Bring in-line with best practices regarding views.

via:
sed -i 's/const ByteStringView&/ByteStringView/g' `git grep -l ByteStringView
Change-Id: I695e3769e0744b44c8111c21fab04920ad5d0f77
Reviewed-on: https://pdfium-review.googlesource.com/c/47283
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index aae902c..fc3f186 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -38,7 +38,7 @@
   bool WriteBlock(const void* pBuf, size_t size) override;
   bool WriteByte(uint8_t byte) override;
   bool WriteDWord(uint32_t i) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 
   FX_FILESIZE CurrentOffset() const override { return offset_; }
 
@@ -111,7 +111,7 @@
   return WriteBlock(buf, strlen(buf));
 }
 
-bool CFX_FileBufferArchive::WriteString(const ByteStringView& str) {
+bool CFX_FileBufferArchive::WriteString(ByteStringView str) {
   return WriteBlock(str.raw_str(), str.GetLength());
 }
 
diff --git a/core/fpdfapi/edit/cpdf_stringarchivestream.cpp b/core/fpdfapi/edit/cpdf_stringarchivestream.cpp
index 328d6a2..4840db8 100644
--- a/core/fpdfapi/edit/cpdf_stringarchivestream.cpp
+++ b/core/fpdfapi/edit/cpdf_stringarchivestream.cpp
@@ -29,7 +29,7 @@
   return true;
 }
 
-bool CPDF_StringArchiveStream::WriteString(const ByteStringView& str) {
+bool CPDF_StringArchiveStream::WriteString(ByteStringView str) {
   stream_->write(str.unterminated_c_str(), str.GetLength());
   return true;
 }
diff --git a/core/fpdfapi/edit/cpdf_stringarchivestream.h b/core/fpdfapi/edit/cpdf_stringarchivestream.h
index aa744a9..59d168f 100644
--- a/core/fpdfapi/edit/cpdf_stringarchivestream.h
+++ b/core/fpdfapi/edit/cpdf_stringarchivestream.h
@@ -17,7 +17,7 @@
   bool WriteDWord(uint32_t i) override;
   FX_FILESIZE CurrentOffset() const override;
   bool WriteBlock(const void* pData, size_t size) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 
  private:
   std::ostringstream* stream_;
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index 41627c0..339e2b6 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -733,7 +733,7 @@
   return pdata[0] * 256 + pdata[1];
 }
 
-uint32_t CPDF_CIDFont::GetNextChar(const ByteStringView& pString,
+uint32_t CPDF_CIDFont::GetNextChar(ByteStringView pString,
                                    size_t* pOffset) const {
   return m_pCMap->GetNextChar(pString, pOffset);
 }
@@ -742,7 +742,7 @@
   return m_pCMap->GetCharSize(charcode);
 }
 
-size_t CPDF_CIDFont::CountChar(const ByteStringView& pString) const {
+size_t CPDF_CIDFont::CountChar(ByteStringView pString) const {
   return m_pCMap->CountChar(pString);
 }
 
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index 5cbeeda..e400859 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -46,9 +46,8 @@
   int GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) override;
   uint32_t GetCharWidthF(uint32_t charcode) override;
   FX_RECT GetCharBBox(uint32_t charcode) override;
-  uint32_t GetNextChar(const ByteStringView& pString,
-                       size_t* pOffset) const override;
-  size_t CountChar(const ByteStringView& pString) const override;
+  uint32_t GetNextChar(ByteStringView pString, size_t* pOffset) const override;
+  size_t CountChar(ByteStringView pString) const override;
   int AppendChar(char* str, uint32_t charcode) const override;
   bool IsVertWriting() const override;
   bool IsUnicodeCompatible() const override;
diff --git a/core/fpdfapi/font/cpdf_cmap.cpp b/core/fpdfapi/font/cpdf_cmap.cpp
index 97a8ed2..3db1acc 100644
--- a/core/fpdfapi/font/cpdf_cmap.cpp
+++ b/core/fpdfapi/font/cpdf_cmap.cpp
@@ -336,8 +336,7 @@
   return it->m_StartCID + charcode - it->m_StartCode;
 }
 
-uint32_t CPDF_CMap::GetNextChar(const ByteStringView& pString,
-                                size_t* pOffset) const {
+uint32_t CPDF_CMap::GetNextChar(ByteStringView pString, size_t* pOffset) const {
   size_t& offset = *pOffset;
   auto pBytes = pString.span();
   switch (m_CodingScheme) {
@@ -403,7 +402,7 @@
   return 1;
 }
 
-size_t CPDF_CMap::CountChar(const ByteStringView& pString) const {
+size_t CPDF_CMap::CountChar(ByteStringView pString) const {
   switch (m_CodingScheme) {
     case OneByte:
       return pString.GetLength();
diff --git a/core/fpdfapi/font/cpdf_cmap.h b/core/fpdfapi/font/cpdf_cmap.h
index 5526293..2c0503a 100644
--- a/core/fpdfapi/font/cpdf_cmap.h
+++ b/core/fpdfapi/font/cpdf_cmap.h
@@ -60,8 +60,8 @@
   uint16_t CIDFromCharCode(uint32_t charcode) const;
 
   int GetCharSize(uint32_t charcode) const;
-  uint32_t GetNextChar(const ByteStringView& pString, size_t* pOffset) const;
-  size_t CountChar(const ByteStringView& pString) const;
+  uint32_t GetNextChar(ByteStringView pString, size_t* pOffset) const;
+  size_t CountChar(ByteStringView pString) const;
   int AppendChar(char* str, uint32_t charcode) const;
 
   void SetVertical(bool vert) { m_bVertical = vert; }
diff --git a/core/fpdfapi/font/cpdf_cmapparser.cpp b/core/fpdfapi/font/cpdf_cmapparser.cpp
index 4707022..21be136 100644
--- a/core/fpdfapi/font/cpdf_cmapparser.cpp
+++ b/core/fpdfapi/font/cpdf_cmapparser.cpp
@@ -31,7 +31,7 @@
   return static_cast<CIDSet>(index);
 }
 
-ByteStringView CMap_GetString(const ByteStringView& word) {
+ByteStringView CMap_GetString(ByteStringView word) {
   if (word.GetLength() <= 2)
     return ByteStringView();
   return word.Right(word.GetLength() - 2);
@@ -44,7 +44,7 @@
 
 CPDF_CMapParser::~CPDF_CMapParser() {}
 
-void CPDF_CMapParser::ParseWord(const ByteStringView& word) {
+void CPDF_CMapParser::ParseWord(ByteStringView word) {
   if (word.IsEmpty()) {
     return;
   }
@@ -139,7 +139,7 @@
   m_LastWord = word;
 }
 
-uint32_t CPDF_CMapParser::GetCode(const ByteStringView& word) const {
+uint32_t CPDF_CMapParser::GetCode(ByteStringView word) const {
   if (word.IsEmpty())
     return 0;
 
@@ -162,8 +162,8 @@
 }
 
 bool CPDF_CMapParser::GetCodeRange(CPDF_CMap::CodeRange& range,
-                                   const ByteStringView& first,
-                                   const ByteStringView& second) const {
+                                   ByteStringView first,
+                                   ByteStringView second) const {
   if (first.GetLength() == 0 || first[0] != '<')
     return false;
 
@@ -195,7 +195,7 @@
 }
 
 // static
-CIDSet CPDF_CMapParser::CharsetFromOrdering(const ByteStringView& ordering) {
+CIDSet CPDF_CMapParser::CharsetFromOrdering(ByteStringView ordering) {
   for (size_t charset = 1; charset < FX_ArraySize(g_CharsetNames); ++charset) {
     if (ordering == g_CharsetNames[charset])
       return CIDSetFromSizeT(charset);
diff --git a/core/fpdfapi/font/cpdf_cmapparser.h b/core/fpdfapi/font/cpdf_cmapparser.h
index 3cd7b33..d8ccfd3 100644
--- a/core/fpdfapi/font/cpdf_cmapparser.h
+++ b/core/fpdfapi/font/cpdf_cmapparser.h
@@ -19,7 +19,7 @@
   explicit CPDF_CMapParser(CPDF_CMap* pMap);
   ~CPDF_CMapParser();
 
-  void ParseWord(const ByteStringView& str);
+  void ParseWord(ByteStringView str);
   bool HasAdditionalMappings() const {
     return !m_AdditionalCharcodeToCIDMappings.empty();
   }
@@ -27,12 +27,12 @@
     return std::move(m_AdditionalCharcodeToCIDMappings);
   }
 
-  uint32_t GetCode(const ByteStringView& word) const;
+  uint32_t GetCode(ByteStringView word) const;
   bool GetCodeRange(CPDF_CMap::CodeRange& range,
-                    const ByteStringView& first,
-                    const ByteStringView& second) const;
+                    ByteStringView first,
+                    ByteStringView second) const;
 
-  static CIDSet CharsetFromOrdering(const ByteStringView& ordering);
+  static CIDSet CharsetFromOrdering(ByteStringView ordering);
 
  private:
   UnownedPtr<CPDF_CMap> const m_pCMap;
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 899beff..b07208c 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -108,7 +108,7 @@
   return false;
 }
 
-size_t CPDF_Font::CountChar(const ByteStringView& pString) const {
+size_t CPDF_Font::CountChar(ByteStringView pString) const {
   return pString.GetLength();
 }
 
@@ -271,7 +271,7 @@
   m_pToUnicodeMap->Load(pStream);
 }
 
-uint32_t CPDF_Font::GetStringWidth(const ByteStringView& pString) {
+uint32_t CPDF_Font::GetStringWidth(ByteStringView pString) {
   size_t offset = 0;
   uint32_t width = 0;
   while (offset < pString.GetLength())
@@ -280,8 +280,7 @@
 }
 
 // static
-CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc,
-                                   const ByteStringView& name) {
+CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc, ByteStringView name) {
   ByteString fontname(name);
   int font_id = PDF_GetStandardFontName(&fontname);
   if (font_id < 0)
@@ -329,8 +328,7 @@
   return pFont->Load() ? std::move(pFont) : nullptr;
 }
 
-uint32_t CPDF_Font::GetNextChar(const ByteStringView& pString,
-                                size_t* pOffset) const {
+uint32_t CPDF_Font::GetNextChar(ByteStringView pString, size_t* pOffset) const {
   if (pString.IsEmpty())
     return 0;
 
diff --git a/core/fpdfapi/font/cpdf_font.h b/core/fpdfapi/font/cpdf_font.h
index 3a91926..e35c696 100644
--- a/core/fpdfapi/font/cpdf_font.h
+++ b/core/fpdfapi/font/cpdf_font.h
@@ -32,8 +32,7 @@
  public:
   static std::unique_ptr<CPDF_Font> Create(CPDF_Document* pDoc,
                                            CPDF_Dictionary* pFontDict);
-  static CPDF_Font* GetStockFont(CPDF_Document* pDoc,
-                                 const ByteStringView& fontname);
+  static CPDF_Font* GetStockFont(CPDF_Document* pDoc, ByteStringView fontname);
   static const uint32_t kInvalidCharCode = static_cast<uint32_t>(-1);
 
   virtual ~CPDF_Font();
@@ -53,9 +52,8 @@
 
   virtual bool IsVertWriting() const;
   virtual bool IsUnicodeCompatible() const;
-  virtual uint32_t GetNextChar(const ByteStringView& pString,
-                               size_t* pOffset) const;
-  virtual size_t CountChar(const ByteStringView& pString) const;
+  virtual uint32_t GetNextChar(ByteStringView pString, size_t* pOffset) const;
+  virtual size_t CountChar(ByteStringView pString) const;
   virtual int AppendChar(char* buf, uint32_t charcode) const;
   virtual int GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) = 0;
 #if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
@@ -77,7 +75,7 @@
   const FX_RECT& GetFontBBox() const { return m_FontBBox; }
   int GetTypeAscent() const { return m_Ascent; }
   int GetTypeDescent() const { return m_Descent; }
-  uint32_t GetStringWidth(const ByteStringView& pString);
+  uint32_t GetStringWidth(ByteStringView pString);
   uint32_t FallbackFontFromCharcode(uint32_t charcode);
   int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode);
   int GetFontFlags() const { return m_Flags; }
diff --git a/core/fpdfapi/font/cpdf_tounicodemap.cpp b/core/fpdfapi/font/cpdf_tounicodemap.cpp
index 5362e48..1f7d7e7 100644
--- a/core/fpdfapi/font/cpdf_tounicodemap.cpp
+++ b/core/fpdfapi/font/cpdf_tounicodemap.cpp
@@ -54,7 +54,7 @@
 }
 
 // Static.
-uint32_t CPDF_ToUnicodeMap::StringToCode(const ByteStringView& str) {
+uint32_t CPDF_ToUnicodeMap::StringToCode(ByteStringView str) {
   int len = str.GetLength();
   if (len == 0)
     return 0;
@@ -91,7 +91,7 @@
 }
 
 // Static.
-WideString CPDF_ToUnicodeMap::StringToWideString(const ByteStringView& str) {
+WideString CPDF_ToUnicodeMap::StringToWideString(ByteStringView str) {
   int len = str.GetLength();
   if (len == 0)
     return WideString();
diff --git a/core/fpdfapi/font/cpdf_tounicodemap.h b/core/fpdfapi/font/cpdf_tounicodemap.h
index 54984d7..d88bfa4 100644
--- a/core/fpdfapi/font/cpdf_tounicodemap.h
+++ b/core/fpdfapi/font/cpdf_tounicodemap.h
@@ -29,8 +29,8 @@
   friend class cpdf_tounicodemap_StringToCode_Test;
   friend class cpdf_tounicodemap_StringToWideString_Test;
 
-  static uint32_t StringToCode(const ByteStringView& str);
-  static WideString StringToWideString(const ByteStringView& str);
+  static uint32_t StringToCode(ByteStringView str);
+  static WideString StringToWideString(ByteStringView str);
 
   uint32_t GetUnicode();
 
diff --git a/core/fpdfapi/page/cpdf_psengine.cpp b/core/fpdfapi/page/cpdf_psengine.cpp
index 0de5652..7eb437b 100644
--- a/core/fpdfapi/page/cpdf_psengine.cpp
+++ b/core/fpdfapi/page/cpdf_psengine.cpp
@@ -157,16 +157,16 @@
   return true;
 }
 
-void CPDF_PSProc::AddOperatorForTesting(const ByteStringView& word) {
+void CPDF_PSProc::AddOperatorForTesting(ByteStringView word) {
   AddOperator(word);
 }
 
-void CPDF_PSProc::AddOperator(const ByteStringView& word) {
-  const auto* pFound = std::lower_bound(
-      std::begin(kPsOpNames), std::end(kPsOpNames), word,
-      [](const PDF_PSOpName& name, const ByteStringView& word) {
-        return name.name < word;
-      });
+void CPDF_PSProc::AddOperator(ByteStringView word) {
+  const auto* pFound =
+      std::lower_bound(std::begin(kPsOpNames), std::end(kPsOpNames), word,
+                       [](const PDF_PSOpName& name, ByteStringView word) {
+                         return name.name < word;
+                       });
   if (pFound != std::end(kPsOpNames) && pFound->name == word)
     m_Operators.push_back(pdfium::MakeUnique<CPDF_PSOP>(pFound->op));
   else
diff --git a/core/fpdfapi/page/cpdf_psengine.h b/core/fpdfapi/page/cpdf_psengine.h
index 7e8e109..3db8db7 100644
--- a/core/fpdfapi/page/cpdf_psengine.h
+++ b/core/fpdfapi/page/cpdf_psengine.h
@@ -91,7 +91,7 @@
   bool Execute(CPDF_PSEngine* pEngine);
 
   // These methods are exposed for testing.
-  void AddOperatorForTesting(const ByteStringView& word);
+  void AddOperatorForTesting(ByteStringView word);
   size_t num_operators() const { return m_Operators.size(); }
   const std::unique_ptr<CPDF_PSOP>& last_operator() {
     return m_Operators.back();
@@ -100,7 +100,7 @@
  private:
   static const int kMaxDepth = 128;
 
-  void AddOperator(const ByteStringView& word);
+  void AddOperator(ByteStringView word);
 
   std::vector<std::unique_ptr<CPDF_PSOP>> m_Operators;
 };
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 2799684..50ef3ad 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -164,7 +164,7 @@
 
 ByteStringView FindFullName(const AbbrPair* table,
                             size_t count,
-                            const ByteStringView& abbr) {
+                            ByteStringView abbr) {
   auto* it = std::find_if(table, table + count, [abbr](const AbbrPair& pair) {
     return pair.abbr == abbr;
   });
@@ -319,14 +319,14 @@
   return index;
 }
 
-void CPDF_StreamContentParser::AddNameParam(const ByteStringView& bsName) {
+void CPDF_StreamContentParser::AddNameParam(ByteStringView bsName) {
   ContentParam& param = m_ParamBuf[GetNextParamPos()];
   param.m_Type = ContentParam::NAME;
   param.m_Name =
       bsName.Contains('#') ? PDF_NameDecode(bsName) : ByteString(bsName);
 }
 
-void CPDF_StreamContentParser::AddNumberParam(const ByteStringView& str) {
+void CPDF_StreamContentParser::AddNumberParam(ByteStringView str) {
   ContentParam& param = m_ParamBuf[GetNextParamPos()];
   param.m_Type = ContentParam::NUMBER;
   param.m_Number = FX_Number(str);
@@ -563,7 +563,7 @@
   });
 }
 
-void CPDF_StreamContentParser::OnOperator(const ByteStringView& op) {
+void CPDF_StreamContentParser::OnOperator(ByteStringView op) {
   static const OpCodes s_OpCodes = InitializeOpCodes();
 
   auto it = s_OpCodes.find(op.GetID());
@@ -1635,13 +1635,13 @@
 
 // static
 ByteStringView CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
-    const ByteStringView& abbr) {
+    ByteStringView abbr) {
   return FindFullName(InlineKeyAbbr, FX_ArraySize(InlineKeyAbbr), abbr);
 }
 
 // static
 ByteStringView CPDF_StreamContentParser::FindValueAbbreviationForTesting(
-    const ByteStringView& abbr) {
+    ByteStringView abbr) {
   return FindFullName(InlineValueAbbr, FX_ArraySize(InlineValueAbbr), abbr);
 }
 
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h
index 53253c0..eb83e1c 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.h
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.h
@@ -58,10 +58,8 @@
   const float* GetType3Data() const { return m_Type3Data; }
   CPDF_Font* FindFont(const ByteString& name);
 
-  static ByteStringView FindKeyAbbreviationForTesting(
-      const ByteStringView& abbr);
-  static ByteStringView FindValueAbbreviationForTesting(
-      const ByteStringView& abbr);
+  static ByteStringView FindKeyAbbreviationForTesting(ByteStringView abbr);
+  static ByteStringView FindValueAbbreviationForTesting(ByteStringView abbr);
 
  private:
   struct ContentParam {
@@ -81,8 +79,8 @@
   using OpCodes = std::map<uint32_t, void (CPDF_StreamContentParser::*)()>;
   static OpCodes InitializeOpCodes();
 
-  void AddNameParam(const ByteStringView& str);
-  void AddNumberParam(const ByteStringView& str);
+  void AddNameParam(ByteStringView str);
+  void AddNumberParam(ByteStringView str);
   void AddObjectParam(std::unique_ptr<CPDF_Object> pObj);
   int GetNextParamPos();
   void ClearAllParams();
@@ -95,7 +93,7 @@
   int GetInteger(uint32_t index) const {
     return static_cast<int>(GetNumber(index));
   }
-  void OnOperator(const ByteStringView& op);
+  void OnOperator(ByteStringView op);
   void AddTextObject(const ByteString* pStrs,
                      float fInitKerning,
                      const std::vector<float>& kernings,
diff --git a/core/fpdfapi/parser/cpdf_number.cpp b/core/fpdfapi/parser/cpdf_number.cpp
index 5b618a7..2233a1a 100644
--- a/core/fpdfapi/parser/cpdf_number.cpp
+++ b/core/fpdfapi/parser/cpdf_number.cpp
@@ -15,7 +15,7 @@
 
 CPDF_Number::CPDF_Number(float value) : m_Number(value) {}
 
-CPDF_Number::CPDF_Number(const ByteStringView& str) : m_Number(str) {}
+CPDF_Number::CPDF_Number(ByteStringView str) : m_Number(str) {}
 
 CPDF_Number::~CPDF_Number() {}
 
diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h
index 724ae9f..5a2adcd 100644
--- a/core/fpdfapi/parser/cpdf_number.h
+++ b/core/fpdfapi/parser/cpdf_number.h
@@ -19,7 +19,7 @@
   CPDF_Number();
   explicit CPDF_Number(int value);
   explicit CPDF_Number(float value);
-  explicit CPDF_Number(const ByteStringView& str);
+  explicit CPDF_Number(ByteStringView str);
   ~CPDF_Number() override;
 
   // CPDF_Object:
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index fc23d49..18d4b0a 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -581,7 +581,7 @@
   return 0;
 }
 
-FX_FILESIZE CPDF_SyntaxParser::FindWordPos(const ByteStringView& word) {
+FX_FILESIZE CPDF_SyntaxParser::FindWordPos(ByteStringView word) {
   AutoRestorer<FX_FILESIZE> pos_restorer(&m_Pos);
   FX_FILESIZE end_offset = FindTag(word);
   while (end_offset >= 0) {
@@ -741,7 +741,7 @@
 
 bool CPDF_SyntaxParser::IsWholeWord(FX_FILESIZE startpos,
                                     FX_FILESIZE limit,
-                                    const ByteStringView& tag,
+                                    ByteStringView tag,
                                     bool checkKeyword) {
   const uint32_t taglen = tag.GetLength();
 
@@ -767,7 +767,7 @@
   return true;
 }
 
-bool CPDF_SyntaxParser::BackwardsSearchToWord(const ByteStringView& tag,
+bool CPDF_SyntaxParser::BackwardsSearchToWord(ByteStringView tag,
                                               FX_FILESIZE limit) {
   int32_t taglen = tag.GetLength();
   if (taglen == 0)
@@ -801,7 +801,7 @@
   }
 }
 
-FX_FILESIZE CPDF_SyntaxParser::FindTag(const ByteStringView& tag) {
+FX_FILESIZE CPDF_SyntaxParser::FindTag(ByteStringView tag) {
   const FX_FILESIZE startpos = GetPos();
   const int32_t taglen = tag.GetLength();
   ASSERT(taglen > 0);
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h
index 6e6b98c..53d0c12 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.h
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.h
@@ -53,8 +53,8 @@
   ByteString GetKeyword();
   void ToNextLine();
   void ToNextWord();
-  bool BackwardsSearchToWord(const ByteStringView& word, FX_FILESIZE limit);
-  FX_FILESIZE FindTag(const ByteStringView& tag);
+  bool BackwardsSearchToWord(ByteStringView word, FX_FILESIZE limit);
+  FX_FILESIZE FindTag(ByteStringView tag);
   bool ReadBlock(uint8_t* pBuf, uint32_t size);
   bool GetCharAt(FX_FILESIZE pos, uint8_t& ch);
   ByteString GetNextWord(bool* bIsNumber);
@@ -89,11 +89,11 @@
   void GetNextWordInternal(bool* bIsNumber);
   bool IsWholeWord(FX_FILESIZE startpos,
                    FX_FILESIZE limit,
-                   const ByteStringView& tag,
+                   ByteStringView tag,
                    bool checkKeyword);
 
   unsigned int ReadEOLMarkers(FX_FILESIZE pos);
-  FX_FILESIZE FindWordPos(const ByteStringView& word);
+  FX_FILESIZE FindWordPos(ByteStringView word);
   FX_FILESIZE FindStreamEndPos();
   std::unique_ptr<CPDF_Stream> ReadStream(
       std::unique_ptr<CPDF_Dictionary> pDict);
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp
index 67f74c5..f607353 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp
@@ -90,7 +90,7 @@
   return pObj ? pObj->GetInteger() : 0;
 }
 
-ByteString PDF_NameDecode(const ByteStringView& bstr) {
+ByteString PDF_NameDecode(ByteStringView bstr) {
   if (!bstr.Contains('#'))
     return ByteString(bstr);
 
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.h b/core/fpdfapi/parser/fpdf_parser_utility.h
index 5fe9b5d..93a991c 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.h
+++ b/core/fpdfapi/parser/fpdf_parser_utility.h
@@ -45,7 +45,7 @@
 
 int32_t GetDirectInteger(const CPDF_Dictionary* pDict, const ByteString& key);
 
-ByteString PDF_NameDecode(const ByteStringView& orig);
+ByteString PDF_NameDecode(ByteStringView orig);
 ByteString PDF_NameEncode(const ByteString& orig);
 
 std::ostream& operator<<(std::ostream& buf, const CPDF_Object* pObj);
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp
index c822b8e..c39deb3 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.cpp
+++ b/core/fpdfdoc/cpdf_defaultappearance.cpp
@@ -18,7 +18,7 @@
 // Find the token and its |nParams| parameters from the start of data,
 // and move the current position to the start of those parameters.
 bool FindTagParamFromStart(CPDF_SimpleParser* parser,
-                           const ByteStringView& token,
+                           ByteStringView token,
                            int nParams) {
   nParams++;
 
@@ -128,7 +128,7 @@
 
 bool CPDF_DefaultAppearance::FindTagParamFromStartForTesting(
     CPDF_SimpleParser* parser,
-    const ByteStringView& token,
+    ByteStringView token,
     int nParams) {
   return FindTagParamFromStart(parser, token, nParams);
 }
diff --git a/core/fpdfdoc/cpdf_defaultappearance.h b/core/fpdfdoc/cpdf_defaultappearance.h
index c386269..c39842c 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.h
+++ b/core/fpdfdoc/cpdf_defaultappearance.h
@@ -30,7 +30,7 @@
   std::pair<Optional<CFX_Color::Type>, FX_ARGB> GetColor();
 
   bool FindTagParamFromStartForTesting(CPDF_SimpleParser* parser,
-                                       const ByteStringView& token,
+                                       ByteStringView token,
                                        int nParams);
 
  private:
diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp
index 72c4e15..e80907c 100644
--- a/core/fpdfdoc/cpdf_occontext.cpp
+++ b/core/fpdfdoc/cpdf_occontext.cpp
@@ -25,8 +25,8 @@
 }
 
 bool HasIntent(const CPDF_Dictionary* pDict,
-               const ByteStringView& csElement,
-               const ByteStringView& csDef) {
+               ByteStringView csElement,
+               ByteStringView csDef) {
   const CPDF_Object* pIntent = pDict->GetDirectObjectFor("Intent");
   if (!pIntent)
     return csElement == csDef;
diff --git a/core/fxcrt/bytestring.cpp b/core/fxcrt/bytestring.cpp
index 4fc0728..21e2aea 100644
--- a/core/fxcrt/bytestring.cpp
+++ b/core/fxcrt/bytestring.cpp
@@ -142,13 +142,13 @@
 ByteString::ByteString(const char* ptr)
     : ByteString(ptr, ptr ? strlen(ptr) : 0) {}
 
-ByteString::ByteString(const ByteStringView& stringSrc) {
+ByteString::ByteString(ByteStringView stringSrc) {
   if (!stringSrc.IsEmpty())
     m_pData.Reset(StringData::Create(stringSrc.unterminated_c_str(),
                                      stringSrc.GetLength()));
 }
 
-ByteString::ByteString(const ByteStringView& str1, const ByteStringView& str2) {
+ByteString::ByteString(ByteStringView str1, ByteStringView str2) {
   FX_SAFE_SIZE_T nSafeLen = str1.GetLength();
   nSafeLen += str2.GetLength();
 
@@ -198,7 +198,7 @@
   return *this;
 }
 
-const ByteString& ByteString::operator=(const ByteStringView& stringSrc) {
+const ByteString& ByteString::operator=(ByteStringView stringSrc) {
   if (stringSrc.IsEmpty())
     clear();
   else
@@ -240,7 +240,7 @@
   return *this;
 }
 
-const ByteString& ByteString::operator+=(const ByteStringView& str) {
+const ByteString& ByteString::operator+=(ByteStringView str) {
   if (!str.IsEmpty())
     Concat(str.unterminated_c_str(), str.GetLength());
 
@@ -258,7 +258,7 @@
          memcmp(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0;
 }
 
-bool ByteString::operator==(const ByteStringView& str) const {
+bool ByteString::operator==(ByteStringView str) const {
   if (!m_pData)
     return str.IsEmpty();
 
@@ -294,7 +294,7 @@
   return result < 0 || (result == 0 && len < other_len);
 }
 
-bool ByteString::operator<(const ByteStringView& str) const {
+bool ByteString::operator<(ByteStringView str) const {
   return Compare(str) < 0;
 }
 
@@ -308,7 +308,7 @@
   return result < 0 || (result == 0 && len < other_len);
 }
 
-bool ByteString::EqualNoCase(const ByteStringView& str) const {
+bool ByteString::EqualNoCase(ByteStringView str) const {
   if (!m_pData)
     return str.IsEmpty();
 
@@ -545,8 +545,7 @@
               : Optional<size_t>();
 }
 
-Optional<size_t> ByteString::Find(const ByteStringView& subStr,
-                                  size_t start) const {
+Optional<size_t> ByteString::Find(ByteStringView subStr, size_t start) const {
   if (!m_pData)
     return Optional<size_t>();
 
@@ -622,8 +621,7 @@
   return nCount;
 }
 
-size_t ByteString::Replace(const ByteStringView& pOld,
-                           const ByteStringView& pNew) {
+size_t ByteString::Replace(ByteStringView pOld, ByteStringView pNew) {
   if (!m_pData || pOld.IsEmpty())
     return 0;
 
@@ -669,7 +667,7 @@
   return nCount;
 }
 
-int ByteString::Compare(const ByteStringView& str) const {
+int ByteString::Compare(ByteStringView str) const {
   if (!m_pData)
     return str.IsEmpty() ? 0 : -1;
 
@@ -695,7 +693,7 @@
   TrimLeft(targets);
 }
 
-void ByteString::Trim(const ByteStringView& targets) {
+void ByteString::Trim(ByteStringView targets) {
   TrimRight(targets);
   TrimLeft(targets);
 }
@@ -708,7 +706,7 @@
   TrimLeft(ByteStringView(target));
 }
 
-void ByteString::TrimLeft(const ByteStringView& targets) {
+void ByteString::TrimLeft(ByteStringView targets) {
   if (!m_pData || targets.IsEmpty())
     return;
 
@@ -742,7 +740,7 @@
   TrimRight(ByteStringView(target));
 }
 
-void ByteString::TrimRight(const ByteStringView& targets) {
+void ByteString::TrimRight(ByteStringView targets) {
   if (!m_pData || targets.IsEmpty())
     return;
 
@@ -769,13 +767,13 @@
   return os.write(str.c_str(), str.GetLength());
 }
 
-std::ostream& operator<<(std::ostream& os, const ByteStringView& str) {
+std::ostream& operator<<(std::ostream& os, ByteStringView str) {
   return os.write(str.unterminated_c_str(), str.GetLength());
 }
 
 }  // namespace fxcrt
 
-uint32_t FX_HashCode_GetA(const ByteStringView& str, bool bIgnoreCase) {
+uint32_t FX_HashCode_GetA(ByteStringView str, bool bIgnoreCase) {
   uint32_t dwHashCode = 0;
   if (bIgnoreCase) {
     for (ByteStringView::UnsignedType c : str)
@@ -787,7 +785,7 @@
   return dwHashCode;
 }
 
-uint32_t FX_HashCode_GetAsIfW(const ByteStringView& str, bool bIgnoreCase) {
+uint32_t FX_HashCode_GetAsIfW(ByteStringView str, bool bIgnoreCase) {
   uint32_t dwHashCode = 0;
   if (bIgnoreCase) {
     for (ByteStringView::UnsignedType c : str)
diff --git a/core/fxcrt/bytestring.h b/core/fxcrt/bytestring.h
index 1bfda60..1c85c05 100644
--- a/core/fxcrt/bytestring.h
+++ b/core/fxcrt/bytestring.h
@@ -56,8 +56,8 @@
   ByteString(const char* ptr, size_t len);
   ByteString(const uint8_t* ptr, size_t len);
 
-  explicit ByteString(const ByteStringView& bstrc);
-  ByteString(const ByteStringView& bstrc1, const ByteStringView& bstrc2);
+  explicit ByteString(ByteStringView bstrc);
+  ByteString(ByteStringView bstrc1, ByteStringView bstrc2);
   ByteString(const std::initializer_list<ByteStringView>& list);
   explicit ByteString(const std::ostringstream& outStream);
 
@@ -114,30 +114,30 @@
   bool IsValidIndex(size_t index) const { return index < GetLength(); }
   bool IsValidLength(size_t length) const { return length <= GetLength(); }
 
-  int Compare(const ByteStringView& str) const;
-  bool EqualNoCase(const ByteStringView& str) const;
+  int Compare(ByteStringView str) const;
+  bool EqualNoCase(ByteStringView str) const;
 
   bool operator==(const char* ptr) const;
-  bool operator==(const ByteStringView& str) const;
+  bool operator==(ByteStringView str) const;
   bool operator==(const ByteString& other) const;
 
   bool operator!=(const char* ptr) const { return !(*this == ptr); }
-  bool operator!=(const ByteStringView& str) const { return !(*this == str); }
+  bool operator!=(ByteStringView str) const { return !(*this == str); }
   bool operator!=(const ByteString& other) const { return !(*this == other); }
 
   bool operator<(const char* ptr) const;
-  bool operator<(const ByteStringView& str) const;
+  bool operator<(ByteStringView str) const;
   bool operator<(const ByteString& other) const;
 
   const ByteString& operator=(const char* str);
-  const ByteString& operator=(const ByteStringView& bstrc);
+  const ByteString& operator=(ByteStringView bstrc);
   const ByteString& operator=(const ByteString& that);
   const ByteString& operator=(ByteString&& that);
 
   const ByteString& operator+=(char ch);
   const ByteString& operator+=(const char* str);
   const ByteString& operator+=(const ByteString& str);
-  const ByteString& operator+=(const ByteStringView& bstrc);
+  const ByteString& operator+=(ByteStringView bstrc);
 
   CharType operator[](const size_t index) const {
     ASSERT(IsValidIndex(index));
@@ -165,11 +165,11 @@
   ByteString Left(size_t count) const;
   ByteString Right(size_t count) const;
 
-  Optional<size_t> Find(const ByteStringView& lpszSub, size_t start = 0) const;
+  Optional<size_t> Find(ByteStringView lpszSub, size_t start = 0) const;
   Optional<size_t> Find(char ch, size_t start = 0) const;
   Optional<size_t> ReverseFind(char ch) const;
 
-  bool Contains(const ByteStringView& lpszSub, size_t start = 0) const {
+  bool Contains(ByteStringView lpszSub, size_t start = 0) const {
     return Find(lpszSub, start).has_value();
   }
 
@@ -182,17 +182,17 @@
 
   void Trim();
   void Trim(char target);
-  void Trim(const ByteStringView& targets);
+  void Trim(ByteStringView targets);
 
   void TrimLeft();
   void TrimLeft(char target);
-  void TrimLeft(const ByteStringView& targets);
+  void TrimLeft(ByteStringView targets);
 
   void TrimRight();
   void TrimRight(char target);
-  void TrimRight(const ByteStringView& targets);
+  void TrimRight(ByteStringView targets);
 
-  size_t Replace(const ByteStringView& lpszOld, const ByteStringView& lpszNew);
+  size_t Replace(ByteStringView lpszOld, ByteStringView lpszNew);
   size_t Remove(char ch);
 
   uint32_t GetID() const { return AsStringView().GetID(); }
@@ -217,33 +217,32 @@
 inline bool operator==(const char* lhs, const ByteString& rhs) {
   return rhs == lhs;
 }
-inline bool operator==(const ByteStringView& lhs, const ByteString& rhs) {
+inline bool operator==(ByteStringView lhs, const ByteString& rhs) {
   return rhs == lhs;
 }
 inline bool operator!=(const char* lhs, const ByteString& rhs) {
   return rhs != lhs;
 }
-inline bool operator!=(const ByteStringView& lhs, const ByteString& rhs) {
+inline bool operator!=(ByteStringView lhs, const ByteString& rhs) {
   return rhs != lhs;
 }
 inline bool operator<(const char* lhs, const ByteString& rhs) {
   return rhs.Compare(lhs) > 0;
 }
 
-inline ByteString operator+(const ByteStringView& str1,
-                            const ByteStringView& str2) {
+inline ByteString operator+(ByteStringView str1, ByteStringView str2) {
   return ByteString(str1, str2);
 }
-inline ByteString operator+(const ByteStringView& str1, const char* str2) {
+inline ByteString operator+(ByteStringView str1, const char* str2) {
   return ByteString(str1, str2);
 }
-inline ByteString operator+(const char* str1, const ByteStringView& str2) {
+inline ByteString operator+(const char* str1, ByteStringView str2) {
   return ByteString(str1, str2);
 }
-inline ByteString operator+(const ByteStringView& str1, char ch) {
+inline ByteString operator+(ByteStringView str1, char ch) {
   return ByteString(str1, ByteStringView(ch));
 }
-inline ByteString operator+(char ch, const ByteStringView& str2) {
+inline ByteString operator+(char ch, ByteStringView str2) {
   return ByteString(ch, str2);
 }
 inline ByteString operator+(const ByteString& str1, const ByteString& str2) {
@@ -261,24 +260,22 @@
 inline ByteString operator+(const char* str1, const ByteString& str2) {
   return ByteString(str1, str2.AsStringView());
 }
-inline ByteString operator+(const ByteString& str1,
-                            const ByteStringView& str2) {
+inline ByteString operator+(const ByteString& str1, ByteStringView str2) {
   return ByteString(str1.AsStringView(), str2);
 }
-inline ByteString operator+(const ByteStringView& str1,
-                            const ByteString& str2) {
+inline ByteString operator+(ByteStringView str1, const ByteString& str2) {
   return ByteString(str1, str2.AsStringView());
 }
 
 std::ostream& operator<<(std::ostream& os, const ByteString& str);
-std::ostream& operator<<(std::ostream& os, const ByteStringView& str);
+std::ostream& operator<<(std::ostream& os, ByteStringView str);
 
 }  // namespace fxcrt
 
 using ByteString = fxcrt::ByteString;
 
-uint32_t FX_HashCode_GetA(const ByteStringView& str, bool bIgnoreCase);
-uint32_t FX_HashCode_GetAsIfW(const ByteStringView& str, bool bIgnoreCase);
+uint32_t FX_HashCode_GetA(ByteStringView str, bool bIgnoreCase);
+uint32_t FX_HashCode_GetAsIfW(ByteStringView str, bool bIgnoreCase);
 
 namespace std {
 
diff --git a/core/fxcrt/cfx_fileaccess_posix.cpp b/core/fxcrt/cfx_fileaccess_posix.cpp
index 6dfb325..b62118d 100644
--- a/core/fxcrt/cfx_fileaccess_posix.cpp
+++ b/core/fxcrt/cfx_fileaccess_posix.cpp
@@ -51,8 +51,7 @@
   Close();
 }
 
-bool CFX_FileAccess_Posix::Open(const ByteStringView& fileName,
-                                uint32_t dwMode) {
+bool CFX_FileAccess_Posix::Open(ByteStringView fileName, uint32_t dwMode) {
   if (m_nFD > -1)
     return false;
 
diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h
index cc05a5d..9222c46 100644
--- a/core/fxcrt/cfx_fileaccess_posix.h
+++ b/core/fxcrt/cfx_fileaccess_posix.h
@@ -22,7 +22,7 @@
   ~CFX_FileAccess_Posix() override;
 
   // FileAccessIface:
-  bool Open(const ByteStringView& fileName, uint32_t dwMode) override;
+  bool Open(ByteStringView fileName, uint32_t dwMode) override;
   bool Open(WideStringView fileName, uint32_t dwMode) override;
   void Close() override;
   FX_FILESIZE GetSize() const override;
diff --git a/core/fxcrt/cfx_fileaccess_windows.cpp b/core/fxcrt/cfx_fileaccess_windows.cpp
index 236dc7e..b6fa2e0 100644
--- a/core/fxcrt/cfx_fileaccess_windows.cpp
+++ b/core/fxcrt/cfx_fileaccess_windows.cpp
@@ -40,8 +40,7 @@
   Close();
 }
 
-bool CFX_FileAccess_Windows::Open(const ByteStringView& fileName,
-                                  uint32_t dwMode) {
+bool CFX_FileAccess_Windows::Open(ByteStringView fileName, uint32_t dwMode) {
   if (m_hFile)
     return false;
 
diff --git a/core/fxcrt/cfx_fileaccess_windows.h b/core/fxcrt/cfx_fileaccess_windows.h
index 175fb7e..a430b53 100644
--- a/core/fxcrt/cfx_fileaccess_windows.h
+++ b/core/fxcrt/cfx_fileaccess_windows.h
@@ -20,7 +20,7 @@
   ~CFX_FileAccess_Windows() override;
 
   // FileAccessIface
-  bool Open(const ByteStringView& fileName, uint32_t dwMode) override;
+  bool Open(ByteStringView fileName, uint32_t dwMode) override;
   bool Open(WideStringView fileName, uint32_t dwMode) override;
   void Close() override;
   FX_FILESIZE GetSize() const override;
diff --git a/core/fxcrt/cfx_widetextbuf.cpp b/core/fxcrt/cfx_widetextbuf.cpp
index 61e2a8d..dea620c 100644
--- a/core/fxcrt/cfx_widetextbuf.cpp
+++ b/core/fxcrt/cfx_widetextbuf.cpp
@@ -16,7 +16,7 @@
   m_DataSize += sizeof(wchar_t);
 }
 
-CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const ByteStringView& ascii) {
+CFX_WideTextBuf& CFX_WideTextBuf::operator<<(ByteStringView ascii) {
   ExpandBuf(ascii.GetLength() * sizeof(wchar_t));
   for (uint8_t ch : ascii) {
     *reinterpret_cast<wchar_t*>(m_pBuffer.get() + m_DataSize) = ch;
diff --git a/core/fxcrt/cfx_widetextbuf.h b/core/fxcrt/cfx_widetextbuf.h
index 6eaef95..0f89197 100644
--- a/core/fxcrt/cfx_widetextbuf.h
+++ b/core/fxcrt/cfx_widetextbuf.h
@@ -35,7 +35,7 @@
 
   CFX_WideTextBuf& operator<<(int i);
   CFX_WideTextBuf& operator<<(double f);
-  CFX_WideTextBuf& operator<<(const ByteStringView& ascii);
+  CFX_WideTextBuf& operator<<(ByteStringView ascii);
   CFX_WideTextBuf& operator<<(const wchar_t* lpsz);
   CFX_WideTextBuf& operator<<(WideStringView str);
   CFX_WideTextBuf& operator<<(const WideString& str);
diff --git a/core/fxcrt/fileaccess_iface.h b/core/fxcrt/fileaccess_iface.h
index 180462b..2b357e8 100644
--- a/core/fxcrt/fileaccess_iface.h
+++ b/core/fxcrt/fileaccess_iface.h
@@ -18,7 +18,7 @@
   static std::unique_ptr<FileAccessIface> Create();
   virtual ~FileAccessIface() = default;
 
-  virtual bool Open(const ByteStringView& fileName, uint32_t dwMode) = 0;
+  virtual bool Open(ByteStringView fileName, uint32_t dwMode) = 0;
   virtual bool Open(WideStringView fileName, uint32_t dwMode) = 0;
   virtual void Close() = 0;
   virtual FX_FILESIZE GetSize() const = 0;
diff --git a/core/fxcrt/fx_number.cpp b/core/fxcrt/fx_number.cpp
index 6c6e551..fa3ef0b 100644
--- a/core/fxcrt/fx_number.cpp
+++ b/core/fxcrt/fx_number.cpp
@@ -23,7 +23,7 @@
 FX_Number::FX_Number(float value)
     : m_bInteger(false), m_bSigned(true), m_FloatValue(value) {}
 
-FX_Number::FX_Number(const ByteStringView& strc)
+FX_Number::FX_Number(ByteStringView strc)
     : m_bInteger(true), m_bSigned(false), m_UnsignedValue(0) {
   if (strc.IsEmpty())
     return;
diff --git a/core/fxcrt/fx_number.h b/core/fxcrt/fx_number.h
index 4c789b4..c03839e 100644
--- a/core/fxcrt/fx_number.h
+++ b/core/fxcrt/fx_number.h
@@ -17,7 +17,7 @@
   explicit FX_Number(uint32_t value);
   explicit FX_Number(int32_t value);
   explicit FX_Number(float value);
-  explicit FX_Number(const ByteStringView& str);
+  explicit FX_Number(ByteStringView str);
 
   bool IsInteger() const { return m_bInteger; }
   bool IsSigned() const { return m_bSigned; }
diff --git a/core/fxcrt/fx_stream.cpp b/core/fxcrt/fx_stream.cpp
index 1d05cd3..51766e9 100644
--- a/core/fxcrt/fx_stream.cpp
+++ b/core/fxcrt/fx_stream.cpp
@@ -107,7 +107,7 @@
   return WriteBlockAtOffset(buffer, GetSize(), size);
 }
 
-bool IFX_SeekableStream::WriteString(const ByteStringView& str) {
+bool IFX_SeekableStream::WriteString(ByteStringView str) {
   return WriteBlock(str.unterminated_c_str(), str.GetLength());
 }
 
diff --git a/core/fxcrt/fx_stream.h b/core/fxcrt/fx_stream.h
index dfaf51e..f049467 100644
--- a/core/fxcrt/fx_stream.h
+++ b/core/fxcrt/fx_stream.h
@@ -39,7 +39,7 @@
 class IFX_WriteStream {
  public:
   virtual bool WriteBlock(const void* pData, size_t size) = 0;
-  virtual bool WriteString(const ByteStringView& str) = 0;
+  virtual bool WriteString(ByteStringView str) = 0;
 
  protected:
   virtual ~IFX_WriteStream() = default;
@@ -99,7 +99,7 @@
 
   // IFX_SeekableWriteStream:
   bool WriteBlock(const void* buffer, size_t size) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 };
 
 #endif  // CORE_FXCRT_FX_STREAM_H_
diff --git a/core/fxcrt/fx_string.cpp b/core/fxcrt/fx_string.cpp
index 58284ab..b55931c 100644
--- a/core/fxcrt/fx_string.cpp
+++ b/core/fxcrt/fx_string.cpp
@@ -24,7 +24,7 @@
   return ByteString(encoder.GetResult());
 }
 
-WideString FX_UTF8Decode(const ByteStringView& bsStr) {
+WideString FX_UTF8Decode(ByteStringView bsStr) {
   if (bsStr.IsEmpty())
     return WideString();
 
@@ -48,7 +48,7 @@
 
 }  // namespace
 
-float StringToFloat(const ByteStringView& strc) {
+float StringToFloat(ByteStringView strc) {
   if (strc.IsEmpty())
     return 0.0;
 
diff --git a/core/fxcrt/fx_string.h b/core/fxcrt/fx_string.h
index 8854ec7..ce033fe 100644
--- a/core/fxcrt/fx_string.h
+++ b/core/fxcrt/fx_string.h
@@ -17,9 +17,9 @@
    ((uint32_t)c4))
 
 ByteString FX_UTF8Encode(WideStringView wsStr);
-WideString FX_UTF8Decode(const ByteStringView& bsStr);
+WideString FX_UTF8Decode(ByteStringView bsStr);
 
-float StringToFloat(const ByteStringView& str);
+float StringToFloat(ByteStringView str);
 float StringToFloat(WideStringView wsStr);
 size_t FloatToString(float f, char* buf);
 
diff --git a/core/fxcrt/widestring.cpp b/core/fxcrt/widestring.cpp
index 5c9f0fa..038b302 100644
--- a/core/fxcrt/widestring.cpp
+++ b/core/fxcrt/widestring.cpp
@@ -870,7 +870,7 @@
 }
 
 // static
-WideString WideString::FromASCII(const ByteStringView& bstr) {
+WideString WideString::FromASCII(ByteStringView bstr) {
   WideString result;
   result.Reserve(bstr.GetLength());
   for (char c : bstr)
@@ -879,7 +879,7 @@
 }
 
 // static
-WideString WideString::FromDefANSI(const ByteStringView& bstr) {
+WideString WideString::FromDefANSI(ByteStringView bstr) {
   int src_len = bstr.GetLength();
   int dest_len = FXSYS_MultiByteToWideChar(
       FX_CODEPAGE_DefANSI, 0, bstr.unterminated_c_str(), src_len, nullptr, 0);
@@ -898,7 +898,7 @@
 }
 
 // static
-WideString WideString::FromUTF8(const ByteStringView& str) {
+WideString WideString::FromUTF8(ByteStringView str) {
   return FX_UTF8Decode(str);
 }
 
diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h
index 3cc2f9a..2dd4d8a 100644
--- a/core/fxcrt/widestring.h
+++ b/core/fxcrt/widestring.h
@@ -59,9 +59,9 @@
 
   ~WideString();
 
-  static WideString FromASCII(const ByteStringView& str) WARN_UNUSED_RESULT;
-  static WideString FromDefANSI(const ByteStringView& str) WARN_UNUSED_RESULT;
-  static WideString FromUTF8(const ByteStringView& str) WARN_UNUSED_RESULT;
+  static WideString FromASCII(ByteStringView str) WARN_UNUSED_RESULT;
+  static WideString FromDefANSI(ByteStringView str) WARN_UNUSED_RESULT;
+  static WideString FromUTF8(ByteStringView str) WARN_UNUSED_RESULT;
   static WideString FromUTF16LE(const unsigned short* str,
                                 size_t len) WARN_UNUSED_RESULT;
 
@@ -192,10 +192,10 @@
   size_t Remove(wchar_t ch);
 
   bool IsASCII() const { return AsStringView().IsASCII(); }
-  bool EqualsASCII(const ByteStringView& that) const {
+  bool EqualsASCII(ByteStringView that) const {
     return AsStringView().EqualsASCII(that);
   }
-  bool EqualsASCIINoCase(const ByteStringView& that) const {
+  bool EqualsASCIINoCase(ByteStringView that) const {
     return AsStringView().EqualsASCIINoCase(that);
   }
 
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 2aec56a..81e07e6 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -134,7 +134,7 @@
   return FPF_SKIACHARSET_Default;
 }
 
-uint32_t FPF_SKIANormalizeFontName(const ByteStringView& bsfamily) {
+uint32_t FPF_SKIANormalizeFontName(ByteStringView bsfamily) {
   uint32_t dwHash = 0;
   int32_t iLength = bsfamily.GetLength();
   const char* pBuffer = bsfamily.unterminated_c_str();
@@ -147,7 +147,7 @@
   return dwHash;
 }
 
-uint32_t FPF_SKIAGetFamilyHash(const ByteStringView& bsFamily,
+uint32_t FPF_SKIAGetFamilyHash(ByteStringView bsFamily,
                                uint32_t dwStyle,
                                uint8_t uCharset) {
   ByteString bsFont(bsFamily);
@@ -165,13 +165,13 @@
   return FX_CharSetIsCJK(uCharset);
 }
 
-bool FPF_SkiaMaybeSymbol(const ByteStringView& bsFacename) {
+bool FPF_SkiaMaybeSymbol(ByteStringView bsFacename) {
   ByteString bsName(bsFacename);
   bsName.MakeLower();
   return bsName.Contains("symbol");
 }
 
-bool FPF_SkiaMaybeArabic(const ByteStringView& bsFacename) {
+bool FPF_SkiaMaybeArabic(ByteStringView bsFacename) {
   ByteString bsName(bsFacename);
   bsName.MakeLower();
   return bsName.Contains("arabic");
@@ -248,7 +248,7 @@
   m_bLoaded = true;
 }
 
-CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
+CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(ByteStringView bsFamilyname,
                                             uint8_t uCharset,
                                             uint32_t dwStyle) {
   uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
@@ -331,7 +331,7 @@
   return pRet;
 }
 
-FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const ByteStringView& bsFile,
+FXFT_Face CFPF_SkiaFontMgr::GetFontFace(ByteStringView bsFile,
                                         int32_t iFaceIndex) {
   if (bsFile.IsEmpty())
     return nullptr;
diff --git a/core/fxge/android/cfpf_skiafontmgr.h b/core/fxge/android/cfpf_skiafontmgr.h
index a5ad5b4..3558759 100644
--- a/core/fxge/android/cfpf_skiafontmgr.h
+++ b/core/fxge/android/cfpf_skiafontmgr.h
@@ -23,12 +23,12 @@
   ~CFPF_SkiaFontMgr();
 
   void LoadSystemFonts();
-  CFPF_SkiaFont* CreateFont(const ByteStringView& bsFamilyname,
+  CFPF_SkiaFont* CreateFont(ByteStringView bsFamilyname,
                             uint8_t uCharset,
                             uint32_t dwStyle);
 
   bool InitFTLibrary();
-  FXFT_Face GetFontFace(const ByteStringView& bsFile, int32_t iFaceIndex);
+  FXFT_Face GetFontFace(ByteStringView bsFile, int32_t iFaceIndex);
 
  private:
   void ScanPath(const ByteString& path);
diff --git a/core/fxge/win32/cpsoutput.cpp b/core/fxge/win32/cpsoutput.cpp
index 5c734aa..0ae6461 100644
--- a/core/fxge/win32/cpsoutput.cpp
+++ b/core/fxge/win32/cpsoutput.cpp
@@ -36,6 +36,6 @@
   return true;
 }
 
-bool CPSOutput::WriteString(const ByteStringView& str) {
+bool CPSOutput::WriteString(ByteStringView str) {
   return WriteBlock(str.unterminated_c_str(), str.GetLength());
 }
diff --git a/core/fxge/win32/cpsoutput.h b/core/fxge/win32/cpsoutput.h
index 1607fe3..132ee58 100644
--- a/core/fxge/win32/cpsoutput.h
+++ b/core/fxge/win32/cpsoutput.h
@@ -21,7 +21,7 @@
 
   // IFX_Writestream
   bool WriteBlock(const void* str, size_t len) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 
  private:
   HDC m_hDC;
diff --git a/fpdfsdk/cpdfsdk_filewriteadapter.cpp b/fpdfsdk/cpdfsdk_filewriteadapter.cpp
index 85fff8e..39a69a5 100644
--- a/fpdfsdk/cpdfsdk_filewriteadapter.cpp
+++ b/fpdfsdk/cpdfsdk_filewriteadapter.cpp
@@ -17,6 +17,6 @@
   return file_write_->WriteBlock(file_write_.Get(), data, size) != 0;
 }
 
-bool CPDFSDK_FileWriteAdapter::WriteString(const ByteStringView& str) {
+bool CPDFSDK_FileWriteAdapter::WriteString(ByteStringView str) {
   return WriteBlock(str.unterminated_c_str(), str.GetLength());
 }
diff --git a/fpdfsdk/cpdfsdk_filewriteadapter.h b/fpdfsdk/cpdfsdk_filewriteadapter.h
index 4d89300..fc42b7f 100644
--- a/fpdfsdk/cpdfsdk_filewriteadapter.h
+++ b/fpdfsdk/cpdfsdk_filewriteadapter.h
@@ -19,7 +19,7 @@
 
   // IFX_WriteStream:
   bool WriteBlock(const void* data, size_t size) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 
  private:
   explicit CPDFSDK_FileWriteAdapter(FPDF_FILEWRITE* file_write);
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 15c2f74..f4cac98 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -970,7 +970,7 @@
 
 bool CPDFXFA_DocEnvironment::SetPropertyInNonXFAGlobalObject(
     CXFA_FFDoc* hDoc,
-    const ByteStringView& szPropName,
+    ByteStringView szPropName,
     CFXJSE_Value* pValue) {
   if (hDoc != m_pContext->GetXFADoc())
     return false;
@@ -989,7 +989,7 @@
 
 bool CPDFXFA_DocEnvironment::GetPropertyFromNonXFAGlobalObject(
     CXFA_FFDoc* hDoc,
-    const ByteStringView& szPropName,
+    ByteStringView szPropName,
     CFXJSE_Value* pValue) {
   if (hDoc != m_pContext->GetXFADoc())
     return false;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index 0613fc3..974de88 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -66,10 +66,10 @@
 #endif  // PDF_XFA_ELEMENT_SUBMIT_ENABLED
 
   bool GetPropertyFromNonXFAGlobalObject(CXFA_FFDoc* hDoc,
-                                         const ByteStringView& szPropName,
+                                         ByteStringView szPropName,
                                          CFXJSE_Value* pValue) override;
   bool SetPropertyInNonXFAGlobalObject(CXFA_FFDoc* hDoc,
-                                       const ByteStringView& szPropName,
+                                       ByteStringView szPropName,
                                        CFXJSE_Value* pValue) override;
 
   RetainPtr<IFX_SeekableReadStream> OpenLinkedFile(
diff --git a/fxjs/cfx_v8.cpp b/fxjs/cfx_v8.cpp
index 7f2ce62..f75d2ef 100644
--- a/fxjs/cfx_v8.cpp
+++ b/fxjs/cfx_v8.cpp
@@ -15,7 +15,7 @@
 
 v8::Local<v8::Value> CFX_V8::GetObjectProperty(
     v8::Local<v8::Object> pObj,
-    const ByteStringView& bsUTF8PropertyName) {
+    ByteStringView bsUTF8PropertyName) {
   if (pObj.IsEmpty())
     return v8::Local<v8::Value>();
   v8::Local<v8::Value> val;
@@ -44,7 +44,7 @@
 }
 
 void CFX_V8::PutObjectProperty(v8::Local<v8::Object> pObj,
-                               const ByteStringView& bsUTF8PropertyName,
+                               ByteStringView bsUTF8PropertyName,
                                v8::Local<v8::Value> pPut) {
   if (pObj.IsEmpty())
     return;
@@ -108,7 +108,7 @@
   return v8::Boolean::New(GetIsolate(), b);
 }
 
-v8::Local<v8::String> CFX_V8::NewString(const ByteStringView& str) {
+v8::Local<v8::String> CFX_V8::NewString(ByteStringView str) {
   v8::Isolate* pIsolate = m_pIsolate ? GetIsolate() : v8::Isolate::GetCurrent();
   return v8::String::NewFromUtf8(pIsolate, str.unterminated_c_str(),
                                  v8::NewStringType::kNormal, str.GetLength())
diff --git a/fxjs/cfx_v8.h b/fxjs/cfx_v8.h
index 1310b8f..91a6851 100644
--- a/fxjs/cfx_v8.h
+++ b/fxjs/cfx_v8.h
@@ -28,7 +28,7 @@
   v8::Local<v8::Number> NewNumber(double number);
   v8::Local<v8::Number> NewNumber(float number);
   v8::Local<v8::Boolean> NewBoolean(bool b);
-  v8::Local<v8::String> NewString(const ByteStringView& str);
+  v8::Local<v8::String> NewString(ByteStringView str);
   v8::Local<v8::String> NewString(WideStringView str);
   v8::Local<v8::Date> NewDate(double d);
 
@@ -50,11 +50,10 @@
 
   // Objects.
   std::vector<WideString> GetObjectPropertyNames(v8::Local<v8::Object> pObj);
-  v8::Local<v8::Value> GetObjectProperty(
-      v8::Local<v8::Object> pObj,
-      const ByteStringView& bsUTF8PropertyName);
+  v8::Local<v8::Value> GetObjectProperty(v8::Local<v8::Object> pObj,
+                                         ByteStringView bsUTF8PropertyName);
   void PutObjectProperty(v8::Local<v8::Object> pObj,
-                         const ByteStringView& bsUTF8PropertyName,
+                         ByteStringView bsUTF8PropertyName,
                          v8::Local<v8::Value> pValue);
 
  protected:
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 2685677..186cb3c 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -187,7 +187,7 @@
   return this;
 }
 
-bool CJS_Runtime::GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+bool CJS_Runtime::GetValueByNameFromGlobalObject(ByteStringView utf8Name,
                                                  CFXJSE_Value* pValue) {
   v8::Isolate::Scope isolate_scope(GetIsolate());
   v8::HandleScope handle_scope(GetIsolate());
@@ -212,7 +212,7 @@
   return true;
 }
 
-bool CJS_Runtime::SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+bool CJS_Runtime::SetValueByNameInGlobalObject(ByteStringView utf8Name,
                                                CFXJSE_Value* pValue) {
   if (utf8Name.IsEmpty() || !pValue)
     return false;
diff --git a/fxjs/cjs_runtime.h b/fxjs/cjs_runtime.h
index 687fdee..6b14b8f 100644
--- a/fxjs/cjs_runtime.h
+++ b/fxjs/cjs_runtime.h
@@ -52,9 +52,9 @@
 
 #ifdef PDF_ENABLE_XFA
   CJS_Runtime* AsCJSRuntime() override;
-  bool GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+  bool GetValueByNameFromGlobalObject(ByteStringView utf8Name,
                                       CFXJSE_Value* pValue) override;
-  bool SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+  bool SetValueByNameInGlobalObject(ByteStringView utf8Name,
                                     CFXJSE_Value* pValue) override;
 #endif  // PDF_ENABLE_XFA
 
diff --git a/fxjs/cjs_runtimestub.cpp b/fxjs/cjs_runtimestub.cpp
index 53ca17c..0a774a56 100644
--- a/fxjs/cjs_runtimestub.cpp
+++ b/fxjs/cjs_runtimestub.cpp
@@ -31,12 +31,12 @@
   return nullptr;
 }
 
-bool CJS_RuntimeStub::GetValueByNameFromGlobalObject(const ByteStringView&,
+bool CJS_RuntimeStub::GetValueByNameFromGlobalObject(ByteStringView,
                                                      CFXJSE_Value*) {
   return false;
 }
 
-bool CJS_RuntimeStub::SetValueByNameInGlobalObject(const ByteStringView&,
+bool CJS_RuntimeStub::SetValueByNameInGlobalObject(ByteStringView,
                                                    CFXJSE_Value*) {
   return false;
 }
diff --git a/fxjs/cjs_runtimestub.h b/fxjs/cjs_runtimestub.h
index b4bb2dd..a702b77 100644
--- a/fxjs/cjs_runtimestub.h
+++ b/fxjs/cjs_runtimestub.h
@@ -28,10 +28,8 @@
 
 #ifdef PDF_ENABLE_XFA
   CJS_Runtime* AsCJSRuntime() override;
-  bool GetValueByNameFromGlobalObject(const ByteStringView&,
-                                      CFXJSE_Value*) override;
-  bool SetValueByNameInGlobalObject(const ByteStringView&,
-                                    CFXJSE_Value*) override;
+  bool GetValueByNameFromGlobalObject(ByteStringView, CFXJSE_Value*) override;
+  bool SetValueByNameInGlobalObject(ByteStringView, CFXJSE_Value*) override;
 #endif  // PDF_ENABLE_XFA
 
   Optional<IJS_Runtime::JS_Error> ExecuteScript(
diff --git a/fxjs/ijs_runtime.h b/fxjs/ijs_runtime.h
index 19f3c63..2d879f6 100644
--- a/fxjs/ijs_runtime.h
+++ b/fxjs/ijs_runtime.h
@@ -59,9 +59,9 @@
 
 #ifdef PDF_ENABLE_XFA
   virtual CJS_Runtime* AsCJSRuntime() = 0;
-  virtual bool GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+  virtual bool GetValueByNameFromGlobalObject(ByteStringView utf8Name,
                                               CFXJSE_Value* pValue) = 0;
-  virtual bool SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+  virtual bool SetValueByNameInGlobalObject(ByteStringView utf8Name,
                                             CFXJSE_Value* pValue) = 0;
 #endif  // PDF_ENABLE_XFA
 
diff --git a/fxjs/xfa/cfxjse_class.cpp b/fxjs/xfa/cfxjse_class.cpp
index b5098c8..2860837 100644
--- a/fxjs/xfa/cfxjse_class.cpp
+++ b/fxjs/xfa/cfxjse_class.cpp
@@ -126,7 +126,7 @@
 
 void DynPropGetterAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass,
                           CFXJSE_Value* pObject,
-                          const ByteStringView& szPropName,
+                          ByteStringView szPropName,
                           CFXJSE_Value* pValue) {
   ASSERT(lpClass);
 
@@ -166,7 +166,7 @@
 
 void DynPropSetterAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass,
                           CFXJSE_Value* pObject,
-                          const ByteStringView& szPropName,
+                          ByteStringView szPropName,
                           CFXJSE_Value* pValue) {
   ASSERT(lpClass);
   int32_t nPropType =
@@ -181,7 +181,7 @@
 
 bool DynPropQueryAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass,
                          CFXJSE_Value* pObject,
-                         const ByteStringView& szPropName) {
+                         ByteStringView szPropName) {
   ASSERT(lpClass);
   int32_t nPropType =
       lpClass->dynPropTypeGetter == nullptr
diff --git a/fxjs/xfa/cfxjse_context.cpp b/fxjs/xfa/cfxjse_context.cpp
index c463a4c..19b9072 100644
--- a/fxjs/xfa/cfxjse_context.cpp
+++ b/fxjs/xfa/cfxjse_context.cpp
@@ -233,8 +233,7 @@
   m_rgClasses.push_back(std::move(pClass));
 }
 
-CFXJSE_Class* CFXJSE_Context::GetClassByName(
-    const ByteStringView& szName) const {
+CFXJSE_Class* CFXJSE_Context::GetClassByName(ByteStringView szName) const {
   auto pClass =
       std::find_if(m_rgClasses.begin(), m_rgClasses.end(),
                    [szName](const std::unique_ptr<CFXJSE_Class>& item) {
diff --git a/fxjs/xfa/cfxjse_context.h b/fxjs/xfa/cfxjse_context.h
index dded868..347a69d 100644
--- a/fxjs/xfa/cfxjse_context.h
+++ b/fxjs/xfa/cfxjse_context.h
@@ -34,7 +34,7 @@
   v8::Local<v8::Context> GetContext();
   std::unique_ptr<CFXJSE_Value> GetGlobalObject();
   void AddClass(std::unique_ptr<CFXJSE_Class> pClass);
-  CFXJSE_Class* GetClassByName(const ByteStringView& szName) const;
+  CFXJSE_Class* GetClassByName(ByteStringView szName) const;
   void EnableCompatibleMode();
   bool ExecuteScript(const char* szScript,
                      CFXJSE_Value* lpRetValue,
diff --git a/fxjs/xfa/cfxjse_engine.cpp b/fxjs/xfa/cfxjse_engine.cpp
index 33c8b5b..3eac0c5 100644
--- a/fxjs/xfa/cfxjse_engine.cpp
+++ b/fxjs/xfa/cfxjse_engine.cpp
@@ -174,7 +174,7 @@
 }
 
 void CFXJSE_Engine::GlobalPropertySetter(CFXJSE_Value* pObject,
-                                         const ByteStringView& szPropName,
+                                         ByteStringView szPropName,
                                          CFXJSE_Value* pValue) {
   CXFA_Object* lpOrginalNode = ToObject(pObject);
   CXFA_Document* pDoc = lpOrginalNode->GetDocument();
@@ -208,7 +208,7 @@
 }
 
 void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
-                                         const ByteStringView& szPropName,
+                                         ByteStringView szPropName,
                                          CFXJSE_Value* pValue) {
   CXFA_Object* pOriginalObject = ToObject(pObject);
   CXFA_Document* pDoc = pOriginalObject->GetDocument();
@@ -268,7 +268,7 @@
 }
 
 int32_t CFXJSE_Engine::GlobalPropTypeGetter(CFXJSE_Value* pOriginalValue,
-                                            const ByteStringView& szPropName,
+                                            ByteStringView szPropName,
                                             bool bQueryIn) {
   CXFA_Object* pObject = ToObject(pOriginalValue);
   if (!pObject)
@@ -284,7 +284,7 @@
 }
 
 void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
-                                         const ByteStringView& szPropName,
+                                         ByteStringView szPropName,
                                          CFXJSE_Value* pReturnValue) {
   CXFA_Object* pOriginalObject = ToObject(pOriginalValue);
   if (!pOriginalObject) {
@@ -357,7 +357,7 @@
 }
 
 void CFXJSE_Engine::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
-                                         const ByteStringView& szPropName,
+                                         ByteStringView szPropName,
                                          CFXJSE_Value* pReturnValue) {
   CXFA_Object* pOriginalObject = ToObject(pOriginalValue);
   if (!pOriginalObject)
@@ -411,7 +411,7 @@
 }
 
 int32_t CFXJSE_Engine::NormalPropTypeGetter(CFXJSE_Value* pOriginalValue,
-                                            const ByteStringView& szPropName,
+                                            ByteStringView szPropName,
                                             bool bQueryIn) {
   CXFA_Object* pObject = ToObject(pOriginalValue);
   if (!pObject)
@@ -516,7 +516,7 @@
 }
 
 bool CFXJSE_Engine::QueryVariableValue(CXFA_Node* pScriptNode,
-                                       const ByteStringView& szPropName,
+                                       ByteStringView szPropName,
                                        CFXJSE_Value* pValue,
                                        bool bGetter) {
   if (!pScriptNode || pScriptNode->GetElementType() != XFA_Element::Script)
diff --git a/fxjs/xfa/cfxjse_engine.h b/fxjs/xfa/cfxjse_engine.h
index 3e5e6c7..66a7944 100644
--- a/fxjs/xfa/cfxjse_engine.h
+++ b/fxjs/xfa/cfxjse_engine.h
@@ -44,25 +44,25 @@
   static CXFA_Object* ToObject(const v8::FunctionCallbackInfo<v8::Value>& info);
   static CXFA_Object* ToObject(CFXJSE_Value* pValue);
   static void GlobalPropertyGetter(CFXJSE_Value* pObject,
-                                   const ByteStringView& szPropName,
+                                   ByteStringView szPropName,
                                    CFXJSE_Value* pValue);
   static void GlobalPropertySetter(CFXJSE_Value* pObject,
-                                   const ByteStringView& szPropName,
+                                   ByteStringView szPropName,
                                    CFXJSE_Value* pValue);
   static void NormalPropertyGetter(CFXJSE_Value* pObject,
-                                   const ByteStringView& szPropName,
+                                   ByteStringView szPropName,
                                    CFXJSE_Value* pValue);
   static void NormalPropertySetter(CFXJSE_Value* pObject,
-                                   const ByteStringView& szPropName,
+                                   ByteStringView szPropName,
                                    CFXJSE_Value* pValue);
   static CJS_Result NormalMethodCall(
       const v8::FunctionCallbackInfo<v8::Value>& info,
       const WideString& functionName);
   static int32_t NormalPropTypeGetter(CFXJSE_Value* pObject,
-                                      const ByteStringView& szPropName,
+                                      ByteStringView szPropName,
                                       bool bQueryIn);
   static int32_t GlobalPropTypeGetter(CFXJSE_Value* pObject,
-                                      const ByteStringView& szPropName,
+                                      ByteStringView szPropName,
                                       bool bQueryIn);
 
   CFXJSE_Engine(CXFA_Document* pDocument, CJS_Runtime* fxjs_runtime);
@@ -115,7 +115,7 @@
   bool IsStrictScopeInJavaScript();
   CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode);
   bool QueryVariableValue(CXFA_Node* pScriptNode,
-                          const ByteStringView& szPropName,
+                          ByteStringView szPropName,
                           CFXJSE_Value* pValue,
                           bool bGetter);
   bool RunVariablesScript(CXFA_Node* pScriptNode);
diff --git a/fxjs/xfa/cfxjse_formcalc_context.cpp b/fxjs/xfa/cfxjse_formcalc_context.cpp
index 08348e8..4aa537f 100644
--- a/fxjs/xfa/cfxjse_formcalc_context.cpp
+++ b/fxjs/xfa/cfxjse_formcalc_context.cpp
@@ -322,7 +322,7 @@
   }
 }
 
-std::pair<bool, uint32_t> PatternStringType(const ByteStringView& szPattern) {
+std::pair<bool, uint32_t> PatternStringType(ByteStringView szPattern) {
   WideString wsPattern = WideString::FromUTF8(szPattern);
   if (L"datetime" == wsPattern.Left(8))
     return {true, XFA_VT_DATETIME};
@@ -415,7 +415,7 @@
 
 LocaleIface* LocaleFromString(CXFA_Document* pDoc,
                               CXFA_LocaleMgr* pMgr,
-                              const ByteStringView& szLocale) {
+                              ByteStringView szLocale) {
   if (!szLocale.IsEmpty())
     return pMgr->GetLocaleByName(WideString::FromUTF8(szLocale));
 
@@ -424,8 +424,7 @@
   return pThisNode->GetLocale();
 }
 
-WideString FormatFromString(LocaleIface* pLocale,
-                            const ByteStringView& szFormat) {
+WideString FormatFromString(LocaleIface* pLocale, ByteStringView szFormat) {
   if (!szFormat.IsEmpty())
     return WideString::FromUTF8(szFormat);
 
@@ -449,7 +448,7 @@
 
 ByteString GetLocalDateTimeFormat(CXFA_Document* pDoc,
                                   int32_t iStyle,
-                                  const ByteStringView& szLocale,
+                                  ByteStringView szLocale,
                                   bool bStandard,
                                   bool bIsDate) {
   CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr();
@@ -773,7 +772,7 @@
                          &iSecond, &iMilliSecond, &iZoneHour, &iZoneMinute);
 }
 
-int32_t DateString2Num(const ByteStringView& szDateString) {
+int32_t DateString2Num(ByteStringView szDateString) {
   int32_t iLength = szDateString.GetLength();
   int32_t iYear = 0;
   int32_t iMonth = 0;
@@ -841,8 +840,7 @@
 }
 
 bool HTMLSTR2Code(const WideString& pData, uint32_t* iCode) {
-  auto cmpFunc = [](const XFA_FMHtmlReserveCode& iter,
-                    const ByteStringView& val) {
+  auto cmpFunc = [](const XFA_FMHtmlReserveCode& iter, ByteStringView val) {
     return strcmp(val.unterminated_c_str(), iter.m_htmlReserve) > 0;
   };
   if (!pData.IsASCII())
@@ -1187,7 +1185,7 @@
   return wsResultBuf.MakeString();
 }
 
-ByteString TrillionUS(const ByteStringView& szData) {
+ByteString TrillionUS(ByteStringView szData) {
   static const ByteStringView pUnits[] = {"zero",  "one",  "two", "three",
                                           "four",  "five", "six", "seven",
                                           "eight", "nine"};
@@ -1353,7 +1351,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Abs(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Abs");
@@ -1375,7 +1373,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Avg(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1) {
@@ -1442,7 +1440,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Ceil(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Ceil");
@@ -1460,7 +1458,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Count(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -1514,7 +1512,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Floor(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Floor");
@@ -1532,7 +1530,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Max(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -1606,7 +1604,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Min(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -1680,7 +1678,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Mod(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 2) {
@@ -1715,7 +1713,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Round(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   int32_t argc = args.GetLength();
@@ -1761,7 +1759,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Sum(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc == 0) {
@@ -1836,7 +1834,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Date(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   if (args.GetLength() != 0) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Date");
@@ -1855,7 +1853,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Date2Num(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -1899,7 +1897,7 @@
 
 // static
 void CFXJSE_FormCalcContext::DateFmt(CFXJSE_Value* pThis,
-                                     const ByteStringView& szFuncName,
+                                     ByteStringView szFuncName,
                                      CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc > 2) {
@@ -1937,7 +1935,7 @@
 
 // static
 void CFXJSE_FormCalcContext::IsoDate2Num(CFXJSE_Value* pThis,
-                                         const ByteStringView& szFuncName,
+                                         ByteStringView szFuncName,
                                          CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"IsoDate2Num");
@@ -1954,7 +1952,7 @@
 
 // static
 void CFXJSE_FormCalcContext::IsoTime2Num(CFXJSE_Value* pThis,
-                                         const ByteStringView& szFuncName,
+                                         ByteStringView szFuncName,
                                          CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -2008,7 +2006,7 @@
 
 // static
 void CFXJSE_FormCalcContext::LocalDateFmt(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc > 2) {
@@ -2045,7 +2043,7 @@
 
 // static
 void CFXJSE_FormCalcContext::LocalTimeFmt(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc > 2) {
@@ -2082,7 +2080,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Num2Date(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -2222,7 +2220,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Num2GMTime(CFXJSE_Value* pThis,
-                                        const ByteStringView& szFuncName,
+                                        ByteStringView szFuncName,
                                         CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -2269,7 +2267,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Num2Time(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -2316,7 +2314,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Time(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   if (args.GetLength() != 0) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Time");
@@ -2333,7 +2331,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Time2Num(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -2418,7 +2416,7 @@
 
 // static
 void CFXJSE_FormCalcContext::TimeFmt(CFXJSE_Value* pThis,
-                                     const ByteStringView& szFuncName,
+                                     ByteStringView szFuncName,
                                      CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc > 2) {
@@ -2454,11 +2452,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::Local2IsoDate(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szDate,
-    const ByteStringView& szFormat,
-    const ByteStringView& szLocale) {
+ByteString CFXJSE_FormCalcContext::Local2IsoDate(CFXJSE_Value* pThis,
+                                                 ByteStringView szDate,
+                                                 ByteStringView szFormat,
+                                                 ByteStringView szLocale) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return ByteString();
@@ -2478,11 +2475,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::IsoDate2Local(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szDate,
-    const ByteStringView& szFormat,
-    const ByteStringView& szLocale) {
+ByteString CFXJSE_FormCalcContext::IsoDate2Local(CFXJSE_Value* pThis,
+                                                 ByteStringView szDate,
+                                                 ByteStringView szFormat,
+                                                 ByteStringView szLocale) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return ByteString();
@@ -2500,11 +2496,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::IsoTime2Local(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szTime,
-    const ByteStringView& szFormat,
-    const ByteStringView& szLocale) {
+ByteString CFXJSE_FormCalcContext::IsoTime2Local(CFXJSE_Value* pThis,
+                                                 ByteStringView szTime,
+                                                 ByteStringView szFormat,
+                                                 ByteStringView szLocale) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return ByteString();
@@ -2524,11 +2519,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::GetLocalDateFormat(
-    CFXJSE_Value* pThis,
-    int32_t iStyle,
-    const ByteStringView& szLocale,
-    bool bStandard) {
+ByteString CFXJSE_FormCalcContext::GetLocalDateFormat(CFXJSE_Value* pThis,
+                                                      int32_t iStyle,
+                                                      ByteStringView szLocale,
+                                                      bool bStandard) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return ByteString();
@@ -2538,11 +2532,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::GetLocalTimeFormat(
-    CFXJSE_Value* pThis,
-    int32_t iStyle,
-    const ByteStringView& szLocale,
-    bool bStandard) {
+ByteString CFXJSE_FormCalcContext::GetLocalTimeFormat(CFXJSE_Value* pThis,
+                                                      int32_t iStyle,
+                                                      ByteStringView szLocale,
+                                                      bool bStandard) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return ByteString();
@@ -2555,7 +2548,7 @@
 ByteString CFXJSE_FormCalcContext::GetStandardDateFormat(
     CFXJSE_Value* pThis,
     int32_t iStyle,
-    const ByteStringView& szLocalStr) {
+    ByteStringView szLocalStr) {
   return GetLocalDateFormat(pThis, iStyle, szLocalStr, true);
 }
 
@@ -2563,15 +2556,15 @@
 ByteString CFXJSE_FormCalcContext::GetStandardTimeFormat(
     CFXJSE_Value* pThis,
     int32_t iStyle,
-    const ByteStringView& szLocalStr) {
+    ByteStringView szLocalStr) {
   return GetLocalTimeFormat(pThis, iStyle, szLocalStr, true);
 }
 
 // static
 ByteString CFXJSE_FormCalcContext::Num2AllTime(CFXJSE_Value* pThis,
                                                int32_t iTime,
-                                               const ByteStringView& szFormat,
-                                               const ByteStringView& szLocale,
+                                               ByteStringView szFormat,
+                                               ByteStringView szLocale,
                                                bool bGM) {
   int32_t iHour = 0;
   int32_t iMin = 0;
@@ -2598,7 +2591,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Apr(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2651,7 +2644,7 @@
 
 // static
 void CFXJSE_FormCalcContext::CTerm(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2682,7 +2675,7 @@
 
 // static
 void CFXJSE_FormCalcContext::FV(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2723,7 +2716,7 @@
 
 // static
 void CFXJSE_FormCalcContext::IPmt(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 5) {
@@ -2780,7 +2773,7 @@
 
 // static
 void CFXJSE_FormCalcContext::NPV(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   int32_t argc = args.GetLength();
@@ -2823,7 +2816,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Pmt(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2858,7 +2851,7 @@
 
 // static
 void CFXJSE_FormCalcContext::PPmt(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 5) {
@@ -2916,7 +2909,7 @@
 
 // static
 void CFXJSE_FormCalcContext::PV(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2951,7 +2944,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Rate(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -2982,7 +2975,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Term(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 3) {
@@ -3013,7 +3006,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Choose(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   int32_t argc = args.GetLength();
@@ -3082,7 +3075,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Exists(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Exists");
@@ -3093,7 +3086,7 @@
 
 // static
 void CFXJSE_FormCalcContext::HasValue(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"HasValue");
@@ -3114,7 +3107,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Oneof(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() < 2) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Oneof");
@@ -3137,7 +3130,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Within(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   if (args.GetLength() != 3) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Within");
@@ -3171,7 +3164,7 @@
 
 // static
 void CFXJSE_FormCalcContext::If(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args) {
   if (args.GetLength() != 3) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"If");
@@ -3185,7 +3178,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Eval(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -3222,7 +3215,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Ref(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -3280,7 +3273,7 @@
 
 // static
 void CFXJSE_FormCalcContext::UnitType(CFXJSE_Value* pThis,
-                                      const ByteStringView& szFuncName,
+                                      ByteStringView szFuncName,
                                       CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"UnitType");
@@ -3387,7 +3380,7 @@
 
 // static
 void CFXJSE_FormCalcContext::UnitValue(CFXJSE_Value* pThis,
-                                       const ByteStringView& szFuncName,
+                                       ByteStringView szFuncName,
                                        CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 2) {
@@ -3526,7 +3519,7 @@
 
 // static
 void CFXJSE_FormCalcContext::At(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"At");
@@ -3553,7 +3546,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Concat(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1) {
@@ -3582,7 +3575,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Decode(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 2) {
@@ -3632,7 +3625,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Encode(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 2) {
@@ -3676,7 +3669,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Format(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() < 2) {
@@ -3759,7 +3752,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Left(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Left");
@@ -3781,7 +3774,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Len(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Len");
@@ -3800,7 +3793,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Lower(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 2) {
@@ -3832,7 +3825,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Ltrim(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Ltrim");
@@ -3852,7 +3845,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Parse(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 2) {
@@ -3988,7 +3981,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Replace(CFXJSE_Value* pThis,
-                                     const ByteStringView& szFuncName,
+                                     ByteStringView szFuncName,
                                      CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 2 || argc > 3) {
@@ -4047,7 +4040,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Right(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Right");
@@ -4069,7 +4062,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Rtrim(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Rtrim");
@@ -4089,7 +4082,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Space(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Space");
@@ -4115,7 +4108,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Str(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -4230,7 +4223,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Stuff(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 3 || argc > 4) {
@@ -4281,7 +4274,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Substr(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args) {
   if (args.GetLength() != 3) {
     ToFormCalcContext(pThis)->ThrowParamCountMismatchException(L"Substr");
@@ -4319,7 +4312,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Uuid(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 0 || argc > 1) {
@@ -4337,7 +4330,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Upper(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 2) {
@@ -4374,7 +4367,7 @@
 
 // static
 void CFXJSE_FormCalcContext::WordNum(CFXJSE_Value* pThis,
-                                     const ByteStringView& szFuncName,
+                                     ByteStringView szFuncName,
                                      CFXJSE_Arguments& args) {
   int32_t argc = args.GetLength();
   if (argc < 1 || argc > 3) {
@@ -4422,7 +4415,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Get(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -4453,7 +4446,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Post(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   int32_t argc = args.GetLength();
@@ -4509,7 +4502,7 @@
 
 // static
 void CFXJSE_FormCalcContext::Put(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   int32_t argc = args.GetLength();
@@ -4550,10 +4543,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::assign_value_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::assign_value_operator(CFXJSE_Value* pThis,
+                                                   ByteStringView szFuncName,
+                                                   CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 2) {
     pContext->ThrowCompilerErrorException();
@@ -4595,10 +4587,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::logical_or_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::logical_or_operator(CFXJSE_Value* pThis,
+                                                 ByteStringView szFuncName,
+                                                 CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4617,10 +4608,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::logical_and_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::logical_and_operator(CFXJSE_Value* pThis,
+                                                  ByteStringView szFuncName,
+                                                  CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4640,7 +4630,7 @@
 
 // static
 void CFXJSE_FormCalcContext::equality_operator(CFXJSE_Value* pThis,
-                                               const ByteStringView& szFuncName,
+                                               ByteStringView szFuncName,
                                                CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4672,10 +4662,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::notequality_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::notequality_operator(CFXJSE_Value* pThis,
+                                                  ByteStringView szFuncName,
+                                                  CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4733,7 +4722,7 @@
 
 // static
 void CFXJSE_FormCalcContext::less_operator(CFXJSE_Value* pThis,
-                                           const ByteStringView& szFuncName,
+                                           ByteStringView szFuncName,
                                            CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4760,10 +4749,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::lessequal_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::lessequal_operator(CFXJSE_Value* pThis,
+                                                ByteStringView szFuncName,
+                                                CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4791,7 +4779,7 @@
 
 // static
 void CFXJSE_FormCalcContext::greater_operator(CFXJSE_Value* pThis,
-                                              const ByteStringView& szFuncName,
+                                              ByteStringView szFuncName,
                                               CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4818,10 +4806,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::greaterequal_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::greaterequal_operator(CFXJSE_Value* pThis,
+                                                   ByteStringView szFuncName,
+                                                   CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4849,7 +4836,7 @@
 
 // static
 void CFXJSE_FormCalcContext::plus_operator(CFXJSE_Value* pThis,
-                                           const ByteStringView& szFuncName,
+                                           ByteStringView szFuncName,
                                            CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4871,7 +4858,7 @@
 
 // static
 void CFXJSE_FormCalcContext::minus_operator(CFXJSE_Value* pThis,
-                                            const ByteStringView& szFuncName,
+                                            ByteStringView szFuncName,
                                             CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4892,7 +4879,7 @@
 
 // static
 void CFXJSE_FormCalcContext::multiple_operator(CFXJSE_Value* pThis,
-                                               const ByteStringView& szFuncName,
+                                               ByteStringView szFuncName,
                                                CFXJSE_Arguments& args) {
   if (args.GetLength() != 2) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4913,7 +4900,7 @@
 
 // static
 void CFXJSE_FormCalcContext::divide_operator(CFXJSE_Value* pThis,
-                                             const ByteStringView& szFuncName,
+                                             ByteStringView szFuncName,
                                              CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 2) {
@@ -4940,7 +4927,7 @@
 
 // static
 void CFXJSE_FormCalcContext::positive_operator(CFXJSE_Value* pThis,
-                                               const ByteStringView& szFuncName,
+                                               ByteStringView szFuncName,
                                                CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4957,7 +4944,7 @@
 
 // static
 void CFXJSE_FormCalcContext::negative_operator(CFXJSE_Value* pThis,
-                                               const ByteStringView& szFuncName,
+                                               ByteStringView szFuncName,
                                                CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -4973,10 +4960,9 @@
 }
 
 // static
-void CFXJSE_FormCalcContext::logical_not_operator(
-    CFXJSE_Value* pThis,
-    const ByteStringView& szFuncName,
-    CFXJSE_Arguments& args) {
+void CFXJSE_FormCalcContext::logical_not_operator(CFXJSE_Value* pThis,
+                                                  ByteStringView szFuncName,
+                                                  CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
     return;
@@ -4994,7 +4980,7 @@
 
 // static
 void CFXJSE_FormCalcContext::dot_accessor(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -5112,7 +5098,7 @@
 
 // static
 void CFXJSE_FormCalcContext::dotdot_accessor(CFXJSE_Value* pThis,
-                                             const ByteStringView& szFuncName,
+                                             ByteStringView szFuncName,
                                              CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -5230,7 +5216,7 @@
 
 // static
 void CFXJSE_FormCalcContext::eval_translation(CFXJSE_Value* pThis,
-                                              const ByteStringView& szFuncName,
+                                              ByteStringView szFuncName,
                                               CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -5259,7 +5245,7 @@
 
 // static
 void CFXJSE_FormCalcContext::is_fm_object(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     args.GetReturnValue()->SetBoolean(false);
@@ -5272,7 +5258,7 @@
 
 // static
 void CFXJSE_FormCalcContext::is_fm_array(CFXJSE_Value* pThis,
-                                         const ByteStringView& szFuncName,
+                                         ByteStringView szFuncName,
                                          CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     args.GetReturnValue()->SetBoolean(false);
@@ -5285,7 +5271,7 @@
 
 // static
 void CFXJSE_FormCalcContext::get_fm_value(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -5320,7 +5306,7 @@
 
 // static
 void CFXJSE_FormCalcContext::get_fm_jsobj(CFXJSE_Value* pThis,
-                                          const ByteStringView& szFuncName,
+                                          ByteStringView szFuncName,
                                           CFXJSE_Arguments& args) {
   if (args.GetLength() != 1) {
     ToFormCalcContext(pThis)->ThrowCompilerErrorException();
@@ -5346,7 +5332,7 @@
 
 // static
 void CFXJSE_FormCalcContext::fm_var_filter(CFXJSE_Value* pThis,
-                                           const ByteStringView& szFuncName,
+                                           ByteStringView szFuncName,
                                            CFXJSE_Arguments& args) {
   CFXJSE_FormCalcContext* pContext = ToFormCalcContext(pThis);
   if (args.GetLength() != 1) {
@@ -5400,7 +5386,7 @@
 
 // static
 void CFXJSE_FormCalcContext::concat_fm_object(CFXJSE_Value* pThis,
-                                              const ByteStringView& szFuncName,
+                                              ByteStringView szFuncName,
                                               CFXJSE_Arguments& args) {
   v8::Isolate* pIsolate = ToFormCalcContext(pThis)->GetScriptRuntime();
   uint32_t iLength = 0;
@@ -5640,11 +5626,10 @@
 }
 
 // static
-ByteString CFXJSE_FormCalcContext::GenerateSomExpression(
-    const ByteStringView& szName,
-    int32_t iIndexFlags,
-    int32_t iIndexValue,
-    bool bIsStar) {
+ByteString CFXJSE_FormCalcContext::GenerateSomExpression(ByteStringView szName,
+                                                         int32_t iIndexFlags,
+                                                         int32_t iIndexValue,
+                                                         bool bIsStar) {
   if (bIsStar)
     return ByteString(szName, "[*]");
 
@@ -5671,10 +5656,9 @@
 }
 
 // static
-bool CFXJSE_FormCalcContext::GetObjectForName(
-    CFXJSE_Value* pThis,
-    CFXJSE_Value* accessorValue,
-    const ByteStringView& szAccessorName) {
+bool CFXJSE_FormCalcContext::GetObjectForName(CFXJSE_Value* pThis,
+                                              CFXJSE_Value* accessorValue,
+                                              ByteStringView szAccessorName) {
   CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument();
   if (!pDoc)
     return false;
@@ -5698,7 +5682,7 @@
 // static
 bool CFXJSE_FormCalcContext::ResolveObjects(CFXJSE_Value* pThis,
                                             CFXJSE_Value* pRefValue,
-                                            const ByteStringView& bsSomExp,
+                                            ByteStringView bsSomExp,
                                             XFA_RESOLVENODE_RS* resolveNodeRS,
                                             bool bdotAccessor,
                                             bool bHasNoResolveName) {
@@ -5980,7 +5964,7 @@
 }
 
 void CFXJSE_FormCalcContext::ThrowNoDefaultPropertyException(
-    const ByteStringView& name) const {
+    ByteStringView name) const {
   ThrowException(WideString::FromUTF8(name) +
                  WideString::FromASCII(" doesn't have a default property."));
 }
diff --git a/fxjs/xfa/cfxjse_formcalc_context.h b/fxjs/xfa/cfxjse_formcalc_context.h
index 7c06a58..adb7862 100644
--- a/fxjs/xfa/cfxjse_formcalc_context.h
+++ b/fxjs/xfa/cfxjse_formcalc_context.h
@@ -30,313 +30,313 @@
   CFXJSE_FormCalcContext* AsFormCalcContext() override;
 
   static void Abs(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Avg(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Ceil(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Count(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Floor(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Max(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Min(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Mod(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Round(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Sum(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Date(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Date2Num(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void DateFmt(CFXJSE_Value* pThis,
-                      const ByteStringView& szFuncName,
+                      ByteStringView szFuncName,
                       CFXJSE_Arguments& args);
   static void IsoDate2Num(CFXJSE_Value* pThis,
-                          const ByteStringView& szFuncName,
+                          ByteStringView szFuncName,
                           CFXJSE_Arguments& args);
   static void IsoTime2Num(CFXJSE_Value* pThis,
-                          const ByteStringView& szFuncName,
+                          ByteStringView szFuncName,
                           CFXJSE_Arguments& args);
   static void LocalDateFmt(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void LocalTimeFmt(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void Num2Date(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void Num2GMTime(CFXJSE_Value* pThis,
-                         const ByteStringView& szFuncName,
+                         ByteStringView szFuncName,
                          CFXJSE_Arguments& args);
   static void Num2Time(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void Time(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Time2Num(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void TimeFmt(CFXJSE_Value* pThis,
-                      const ByteStringView& szFuncName,
+                      ByteStringView szFuncName,
                       CFXJSE_Arguments& args);
 
   static ByteString Local2IsoDate(CFXJSE_Value* pThis,
-                                  const ByteStringView& szDate,
-                                  const ByteStringView& szFormat,
-                                  const ByteStringView& szLocale);
+                                  ByteStringView szDate,
+                                  ByteStringView szFormat,
+                                  ByteStringView szLocale);
   static ByteString IsoDate2Local(CFXJSE_Value* pThis,
-                                  const ByteStringView& szDate,
-                                  const ByteStringView& szFormat,
-                                  const ByteStringView& szLocale);
+                                  ByteStringView szDate,
+                                  ByteStringView szFormat,
+                                  ByteStringView szLocale);
   static ByteString IsoTime2Local(CFXJSE_Value* pThis,
-                                  const ByteStringView& szTime,
-                                  const ByteStringView& szFormat,
-                                  const ByteStringView& szLocale);
+                                  ByteStringView szTime,
+                                  ByteStringView szFormat,
+                                  ByteStringView szLocale);
   static ByteString GetLocalDateFormat(CFXJSE_Value* pThis,
                                        int32_t iStyle,
-                                       const ByteStringView& szLocalStr,
+                                       ByteStringView szLocalStr,
                                        bool bStandard);
   static ByteString GetLocalTimeFormat(CFXJSE_Value* pThis,
                                        int32_t iStyle,
-                                       const ByteStringView& szLocalStr,
+                                       ByteStringView szLocalStr,
                                        bool bStandard);
   static ByteString GetStandardDateFormat(CFXJSE_Value* pThis,
                                           int32_t iStyle,
-                                          const ByteStringView& szLocalStr);
+                                          ByteStringView szLocalStr);
   static ByteString GetStandardTimeFormat(CFXJSE_Value* pThis,
                                           int32_t iStyle,
-                                          const ByteStringView& szLocalStr);
+                                          ByteStringView szLocalStr);
   static ByteString Num2AllTime(CFXJSE_Value* pThis,
                                 int32_t iTime,
-                                const ByteStringView& szFormat,
-                                const ByteStringView& szLocale,
+                                ByteStringView szFormat,
+                                ByteStringView szLocale,
                                 bool bGM);
 
   static void Apr(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void CTerm(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void FV(CFXJSE_Value* pThis,
-                 const ByteStringView& szFuncName,
+                 ByteStringView szFuncName,
                  CFXJSE_Arguments& args);
   static void IPmt(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void NPV(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Pmt(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void PPmt(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void PV(CFXJSE_Value* pThis,
-                 const ByteStringView& szFuncName,
+                 ByteStringView szFuncName,
                  CFXJSE_Arguments& args);
   static void Rate(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Term(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Choose(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Exists(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void HasValue(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void Oneof(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Within(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void If(CFXJSE_Value* pThis,
-                 const ByteStringView& szFuncName,
+                 ByteStringView szFuncName,
                  CFXJSE_Arguments& args);
   static void Eval(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Ref(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void UnitType(CFXJSE_Value* pThis,
-                       const ByteStringView& szFuncName,
+                       ByteStringView szFuncName,
                        CFXJSE_Arguments& args);
   static void UnitValue(CFXJSE_Value* pThis,
-                        const ByteStringView& szFuncName,
+                        ByteStringView szFuncName,
                         CFXJSE_Arguments& args);
 
   static void At(CFXJSE_Value* pThis,
-                 const ByteStringView& szFuncName,
+                 ByteStringView szFuncName,
                  CFXJSE_Arguments& args);
   static void Concat(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Decode(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Encode(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Format(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Left(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Len(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Lower(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Ltrim(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Parse(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Replace(CFXJSE_Value* pThis,
-                      const ByteStringView& szFuncName,
+                      ByteStringView szFuncName,
                       CFXJSE_Arguments& args);
   static void Right(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Rtrim(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Space(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Str(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Stuff(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void Substr(CFXJSE_Value* pThis,
-                     const ByteStringView& szFuncName,
+                     ByteStringView szFuncName,
                      CFXJSE_Arguments& args);
   static void Uuid(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Upper(CFXJSE_Value* pThis,
-                    const ByteStringView& szFuncName,
+                    ByteStringView szFuncName,
                     CFXJSE_Arguments& args);
   static void WordNum(CFXJSE_Value* pThis,
-                      const ByteStringView& szFuncName,
+                      ByteStringView szFuncName,
                       CFXJSE_Arguments& args);
 
   static void Get(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void Post(CFXJSE_Value* pThis,
-                   const ByteStringView& szFuncName,
+                   ByteStringView szFuncName,
                    CFXJSE_Arguments& args);
   static void Put(CFXJSE_Value* pThis,
-                  const ByteStringView& szFuncName,
+                  ByteStringView szFuncName,
                   CFXJSE_Arguments& args);
   static void assign_value_operator(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args);
   static void logical_or_operator(CFXJSE_Value* pThis,
-                                  const ByteStringView& szFuncName,
+                                  ByteStringView szFuncName,
                                   CFXJSE_Arguments& args);
   static void logical_and_operator(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args);
   static void equality_operator(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args);
   static void notequality_operator(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args);
   static bool fm_ref_equal(CFXJSE_Value* pThis, CFXJSE_Arguments& args);
   static void less_operator(CFXJSE_Value* pThis,
-                            const ByteStringView& szFuncName,
+                            ByteStringView szFuncName,
                             CFXJSE_Arguments& args);
   static void lessequal_operator(CFXJSE_Value* pThis,
-                                 const ByteStringView& szFuncName,
+                                 ByteStringView szFuncName,
                                  CFXJSE_Arguments& args);
   static void greater_operator(CFXJSE_Value* pThis,
-                               const ByteStringView& szFuncName,
+                               ByteStringView szFuncName,
                                CFXJSE_Arguments& args);
   static void greaterequal_operator(CFXJSE_Value* pThis,
-                                    const ByteStringView& szFuncName,
+                                    ByteStringView szFuncName,
                                     CFXJSE_Arguments& args);
   static void plus_operator(CFXJSE_Value* pThis,
-                            const ByteStringView& szFuncName,
+                            ByteStringView szFuncName,
                             CFXJSE_Arguments& args);
   static void minus_operator(CFXJSE_Value* pThis,
-                             const ByteStringView& szFuncName,
+                             ByteStringView szFuncName,
                              CFXJSE_Arguments& args);
   static void multiple_operator(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args);
   static void divide_operator(CFXJSE_Value* pThis,
-                              const ByteStringView& szFuncName,
+                              ByteStringView szFuncName,
                               CFXJSE_Arguments& args);
   static void positive_operator(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args);
   static void negative_operator(CFXJSE_Value* pThis,
-                                const ByteStringView& szFuncName,
+                                ByteStringView szFuncName,
                                 CFXJSE_Arguments& args);
   static void logical_not_operator(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args);
   static void dot_accessor(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void dotdot_accessor(CFXJSE_Value* pThis,
-                              const ByteStringView& szFuncName,
+                              ByteStringView szFuncName,
                               CFXJSE_Arguments& args);
   static void eval_translation(CFXJSE_Value* pThis,
-                               const ByteStringView& szFuncName,
+                               ByteStringView szFuncName,
                                CFXJSE_Arguments& args);
   static void is_fm_object(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void is_fm_array(CFXJSE_Value* pThis,
-                          const ByteStringView& szFuncName,
+                          ByteStringView szFuncName,
                           CFXJSE_Arguments& args);
   static void get_fm_value(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void get_fm_jsobj(CFXJSE_Value* pThis,
-                           const ByteStringView& szFuncName,
+                           ByteStringView szFuncName,
                            CFXJSE_Arguments& args);
   static void fm_var_filter(CFXJSE_Value* pThis,
-                            const ByteStringView& szFuncName,
+                            ByteStringView szFuncName,
                             CFXJSE_Arguments& args);
   static void concat_fm_object(CFXJSE_Value* pThis,
-                               const ByteStringView& szFuncName,
+                               ByteStringView szFuncName,
                                CFXJSE_Arguments& args);
 
   static int32_t hvalue_get_array_length(CFXJSE_Value* pThis,
@@ -351,16 +351,16 @@
                                     CFXJSE_Value* pDefaultValue);
   static bool SetObjectDefaultValue(CFXJSE_Value* pObjectValue,
                                     CFXJSE_Value* pNewValue);
-  static ByteString GenerateSomExpression(const ByteStringView& szName,
+  static ByteString GenerateSomExpression(ByteStringView szName,
                                           int32_t iIndexFlags,
                                           int32_t iIndexValue,
                                           bool bIsStar);
   static bool GetObjectForName(CFXJSE_Value* pThis,
                                CFXJSE_Value* accessorValue,
-                               const ByteStringView& szAccessorName);
+                               ByteStringView szAccessorName);
   static bool ResolveObjects(CFXJSE_Value* pThis,
                              CFXJSE_Value* pParentValue,
-                             const ByteStringView& bsSomExp,
+                             ByteStringView bsSomExp,
                              XFA_RESOLVENODE_RS* resolveNodeRS,
                              bool bdotAccessor,
                              bool bHasNoResolveName);
@@ -392,7 +392,7 @@
   v8::Isolate* GetScriptRuntime() const { return m_pIsolate.Get(); }
   CXFA_Document* GetDocument() const { return m_pDocument.Get(); }
 
-  void ThrowNoDefaultPropertyException(const ByteStringView& name) const;
+  void ThrowNoDefaultPropertyException(ByteStringView name) const;
   void ThrowCompilerErrorException() const;
   void ThrowDivideByZeroException() const;
   void ThrowServerDeniedException() const;
diff --git a/fxjs/xfa/cfxjse_value.cpp b/fxjs/xfa/cfxjse_value.cpp
index 91f9fcd..e668c07 100644
--- a/fxjs/xfa/cfxjse_value.cpp
+++ b/fxjs/xfa/cfxjse_value.cpp
@@ -53,7 +53,7 @@
 
 }  // namespace
 
-void FXJSE_ThrowMessage(const ByteStringView& utf8Message) {
+void FXJSE_ThrowMessage(ByteStringView utf8Message) {
   v8::Isolate* pIsolate = v8::Isolate::GetCurrent();
   ASSERT(pIsolate);
 
@@ -126,7 +126,7 @@
   m_hValue.Reset(GetIsolate(), pValue);
 }
 
-bool CFXJSE_Value::SetObjectProperty(const ByteStringView& szPropName,
+bool CFXJSE_Value::SetObjectProperty(ByteStringView szPropName,
                                      CFXJSE_Value* lpPropValue) {
   ASSERT(lpPropValue);
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
@@ -147,7 +147,7 @@
       .FromJust();
 }
 
-bool CFXJSE_Value::GetObjectProperty(const ByteStringView& szPropName,
+bool CFXJSE_Value::GetObjectProperty(ByteStringView szPropName,
                                      CFXJSE_Value* lpPropValue) {
   ASSERT(lpPropValue);
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
@@ -200,7 +200,7 @@
   return true;
 }
 
-bool CFXJSE_Value::DeleteObjectProperty(const ByteStringView& szPropName) {
+bool CFXJSE_Value::DeleteObjectProperty(ByteStringView szPropName) {
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
   v8::Local<v8::Value> hObject =
       v8::Local<v8::Value>::New(GetIsolate(), m_hValue);
@@ -217,7 +217,7 @@
       .FromJust();
 }
 
-bool CFXJSE_Value::HasObjectOwnProperty(const ByteStringView& szPropName,
+bool CFXJSE_Value::HasObjectOwnProperty(ByteStringView szPropName,
                                         bool bUseTypeGetter) {
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
   v8::Local<v8::Value> hObject =
@@ -239,7 +239,7 @@
               .FromMaybe(false));
 }
 
-bool CFXJSE_Value::SetObjectOwnProperty(const ByteStringView& szPropName,
+bool CFXJSE_Value::SetObjectOwnProperty(ByteStringView szPropName,
                                         CFXJSE_Value* lpPropValue) {
   ASSERT(lpPropValue);
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
@@ -477,7 +477,7 @@
   m_hValue.Reset(GetIsolate(), hValue);
 }
 
-void CFXJSE_Value::SetString(const ByteStringView& szString) {
+void CFXJSE_Value::SetString(ByteStringView szString) {
   CFXJSE_ScopeUtil_IsolateHandle scope(GetIsolate());
   v8::Local<v8::Value> hValue =
       v8::String::NewFromUtf8(GetIsolate(), szString.unterminated_c_str(),
diff --git a/fxjs/xfa/cfxjse_value.h b/fxjs/xfa/cfxjse_value.h
index 06c5cc2..38a16e9 100644
--- a/fxjs/xfa/cfxjse_value.h
+++ b/fxjs/xfa/cfxjse_value.h
@@ -48,23 +48,20 @@
   void SetBoolean(bool bBoolean);
   void SetInteger(int32_t nInteger);
   void SetDouble(double dDouble);
-  void SetString(const ByteStringView& szString);
+  void SetString(ByteStringView szString);
   void SetFloat(float fFloat);
 
   void SetObject(CFXJSE_HostObject* lpObject, CFXJSE_Class* pClass);
   void SetArray(const std::vector<std::unique_ptr<CFXJSE_Value>>& values);
   void SetDate(double dDouble);
 
-  bool GetObjectProperty(const ByteStringView& szPropName,
-                         CFXJSE_Value* lpPropValue);
-  bool SetObjectProperty(const ByteStringView& szPropName,
-                         CFXJSE_Value* lpPropValue);
+  bool GetObjectProperty(ByteStringView szPropName, CFXJSE_Value* lpPropValue);
+  bool SetObjectProperty(ByteStringView szPropName, CFXJSE_Value* lpPropValue);
   bool GetObjectPropertyByIdx(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
   bool SetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
-  bool DeleteObjectProperty(const ByteStringView& szPropName);
-  bool HasObjectOwnProperty(const ByteStringView& szPropName,
-                            bool bUseTypeGetter);
-  bool SetObjectOwnProperty(const ByteStringView& szPropName,
+  bool DeleteObjectProperty(ByteStringView szPropName);
+  bool HasObjectOwnProperty(ByteStringView szPropName, bool bUseTypeGetter);
+  bool SetObjectOwnProperty(ByteStringView szPropName,
                             CFXJSE_Value* lpPropValue);
   bool SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value* lpNewThis);
 
diff --git a/fxjs/xfa/fxjse.h b/fxjs/xfa/fxjse.h
index 6343fb7..5aa6b39 100644
--- a/fxjs/xfa/fxjse.h
+++ b/fxjs/xfa/fxjse.h
@@ -43,13 +43,13 @@
     const v8::FunctionCallbackInfo<v8::Value>& info,
     const WideString& functionName);
 typedef void (*FXJSE_FuncCallback)(CFXJSE_Value* pThis,
-                                   const ByteStringView& szFuncName,
+                                   ByteStringView szFuncName,
                                    CFXJSE_Arguments& args);
 typedef void (*FXJSE_PropAccessor)(CFXJSE_Value* pObject,
-                                   const ByteStringView& szPropName,
+                                   ByteStringView szPropName,
                                    CFXJSE_Value* pValue);
 typedef int32_t (*FXJSE_PropTypeGetter)(CFXJSE_Value* pObject,
-                                        const ByteStringView& szPropName,
+                                        ByteStringView szPropName,
                                         bool bQueryIn);
 
 enum FXJSE_ClassPropTypes {
@@ -80,6 +80,6 @@
 extern const FXJSE_CLASS_DESCRIPTOR VariablesClassDescriptor;
 extern const FXJSE_CLASS_DESCRIPTOR kFormCalcFM2JSDescriptor;
 
-void FXJSE_ThrowMessage(const ByteStringView& utf8Message);
+void FXJSE_ThrowMessage(ByteStringView utf8Message);
 
 #endif  // FXJS_XFA_FXJSE_H_
diff --git a/testing/string_write_stream.cpp b/testing/string_write_stream.cpp
index 77e6825..53141eb 100644
--- a/testing/string_write_stream.cpp
+++ b/testing/string_write_stream.cpp
@@ -26,7 +26,7 @@
   return true;
 }
 
-bool StringWriteStream::WriteString(const ByteStringView& str) {
+bool StringWriteStream::WriteString(ByteStringView str) {
   stream_.write(str.unterminated_c_str(), str.GetLength());
   return true;
 }
diff --git a/testing/string_write_stream.h b/testing/string_write_stream.h
index b266f33..08a2174 100644
--- a/testing/string_write_stream.h
+++ b/testing/string_write_stream.h
@@ -21,7 +21,7 @@
   bool WriteBlockAtOffset(const void* pData,
                           FX_FILESIZE offset,
                           size_t size) override;
-  bool WriteString(const ByteStringView& str) override;
+  bool WriteString(ByteStringView str) override;
 
   std::string ToString() const { return stream_.str(); }
 
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp
index fc694a1..2f9cc67 100644
--- a/testing/xfa_js_embedder_test.cpp
+++ b/testing/xfa_js_embedder_test.cpp
@@ -71,7 +71,7 @@
   return true;
 }
 
-bool XFAJSEmbedderTest::Execute(const ByteStringView& input) {
+bool XFAJSEmbedderTest::Execute(ByteStringView input) {
   if (ExecuteHelper(input))
     return true;
 
@@ -86,11 +86,11 @@
   return false;
 }
 
-bool XFAJSEmbedderTest::ExecuteSilenceFailure(const ByteStringView& input) {
+bool XFAJSEmbedderTest::ExecuteSilenceFailure(ByteStringView input) {
   return ExecuteHelper(input);
 }
 
-bool XFAJSEmbedderTest::ExecuteHelper(const ByteStringView& input) {
+bool XFAJSEmbedderTest::ExecuteHelper(ByteStringView input) {
   value_ = pdfium::MakeUnique<CFXJSE_Value>(GetIsolate());
   return script_context_->RunScript(CXFA_Script::Type::Formcalc,
                                     WideString::FromUTF8(input).AsStringView(),
diff --git a/testing/xfa_js_embedder_test.h b/testing/xfa_js_embedder_test.h
index 7200658..412ffd9 100644
--- a/testing/xfa_js_embedder_test.h
+++ b/testing/xfa_js_embedder_test.h
@@ -32,8 +32,8 @@
   v8::Isolate* GetIsolate() const { return isolate_; }
   CXFA_Document* GetXFADocument() const;
 
-  bool Execute(const ByteStringView& input);
-  bool ExecuteSilenceFailure(const ByteStringView& input);
+  bool Execute(ByteStringView input);
+  bool ExecuteSilenceFailure(ByteStringView input);
 
   CFXJSE_Engine* GetScriptContext() const { return script_context_; }
   CFXJSE_Value* GetValue() const { return value_.get(); }
@@ -44,7 +44,7 @@
   v8::Isolate* isolate_ = nullptr;
   CFXJSE_Engine* script_context_ = nullptr;
 
-  bool ExecuteHelper(const ByteStringView& input);
+  bool ExecuteHelper(ByteStringView input);
 };
 
 #endif  // TESTING_XFA_JS_EMBEDDER_TEST_H_
diff --git a/xfa/fgas/font/cfgas_pdffontmgr.cpp b/xfa/fgas/font/cfgas_pdffontmgr.cpp
index ee18aa4..beaefb1 100644
--- a/xfa/fgas/font/cfgas_pdffontmgr.cpp
+++ b/xfa/fgas/font/cfgas_pdffontmgr.cpp
@@ -110,7 +110,7 @@
   return strPsName;
 }
 
-bool CFGAS_PDFFontMgr::PsNameMatchDRFontName(const ByteStringView& bsPsName,
+bool CFGAS_PDFFontMgr::PsNameMatchDRFontName(ByteStringView bsPsName,
                                              bool bBold,
                                              bool bItalic,
                                              const ByteString& bsDRFontName,
diff --git a/xfa/fgas/font/cfgas_pdffontmgr.h b/xfa/fgas/font/cfgas_pdffontmgr.h
index 38fdd92..d2274fb 100644
--- a/xfa/fgas/font/cfgas_pdffontmgr.h
+++ b/xfa/fgas/font/cfgas_pdffontmgr.h
@@ -34,7 +34,7 @@
   ByteString PsNameToFontName(const ByteString& strPsName,
                               bool bBold,
                               bool bItalic);
-  bool PsNameMatchDRFontName(const ByteStringView& bsPsName,
+  bool PsNameMatchDRFontName(ByteStringView bsPsName,
                              bool bBold,
                              bool bItalic,
                              const ByteString& bsDRFontName,
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index f455238..9baef64 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -263,12 +263,11 @@
   virtual bool Submit(CXFA_FFDoc* hDoc, CXFA_Submit* submit) = 0;
 #endif  // PDF_XFA_ELEMENT_SUBMIT_ENABLED
 
-  virtual bool GetPropertyFromNonXFAGlobalObject(
-      CXFA_FFDoc* hDoc,
-      const ByteStringView& szPropName,
-      CFXJSE_Value* pValue) = 0;
+  virtual bool GetPropertyFromNonXFAGlobalObject(CXFA_FFDoc* hDoc,
+                                                 ByteStringView szPropName,
+                                                 CFXJSE_Value* pValue) = 0;
   virtual bool SetPropertyInNonXFAGlobalObject(CXFA_FFDoc* hDoc,
-                                               const ByteStringView& szPropName,
+                                               ByteStringView szPropName,
                                                CFXJSE_Value* pValue) = 0;
   virtual RetainPtr<IFX_SeekableReadStream> OpenLinkedFile(
       CXFA_FFDoc* hDoc,