Atomicize frequently identical ResourceResponse string members.
[WebKit-https.git] / Source / WebCore / platform / network / mac / ResourceResponseMac.mm
index 3ff8bd2dafbc939601e6368bf3cd9e8fe162304e..e3f689bceb7acdf2089d8db2fccfbd8604e2ea85 100644 (file)
@@ -120,7 +120,7 @@ void ResourceResponse::platformLazyInit(InitLevel initLevel)
         // Workaround for <rdar://problem/8757088>, can be removed once that is fixed.
         unsigned textEncodingNameLength = m_textEncodingName.length();
         if (textEncodingNameLength >= 2 && m_textEncodingName[0U] == '"' && m_textEncodingName[textEncodingNameLength - 1] == '"')
-            m_textEncodingName = m_textEncodingName.substring(1, textEncodingNameLength - 2);
+            m_textEncodingName = m_textEncodingName.string().substring(1, textEncodingNameLength - 2);
 
         if ([m_nsResponse.get() isKindOfClass:[NSHTTPURLResponse class]]) {
             NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)m_nsResponse.get();