Title: [183901] trunk/Source/WebCore
Revision
183901
Author
commit-qu...@webkit.org
Date
2015-05-06 17:28:22 -0700 (Wed, 06 May 2015)

Log Message

Rename URL::copy() to URL::isolatedCopy() to match String.
https://bugs.webkit.org/show_bug.cgi?id=144684

Patch by Sungmann Cho <sungmann....@navercorp.com> on 2015-05-06
Reviewed by Darin Adler.

No new tests, no behavior change.

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::setURL):
(WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::BlobRegistryContext::BlobRegistryContext):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::updatePredictedBaseURL):
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::PreloadRequest):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* platform/CrossThreadCopier.cpp:
(WebCore::URL>::copy):
* platform/URL.cpp:
(WebCore::URL::isolatedCopy):
(WebCore::URL::copy): Deleted.
* platform/URL.h:
(WebCore::URLCapture::URLCapture):
* platform/network/BlobPart.h:
(WebCore::BlobPart::detachFromCurrentThread):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::copyData):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::copyData):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183900 => 183901)


--- trunk/Source/WebCore/ChangeLog	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/ChangeLog	2015-05-07 00:28:22 UTC (rev 183901)
@@ -1,3 +1,39 @@
+2015-05-06  Sungmann Cho  <sungmann....@navercorp.com>
+
+        Rename URL::copy() to URL::isolatedCopy() to match String.
+        https://bugs.webkit.org/show_bug.cgi?id=144684
+
+        Reviewed by Darin Adler.
+
+        No new tests, no behavior change.
+
+        * Modules/websockets/WebSocketHandshake.cpp:
+        (WebCore::WebSocketHandshake::setURL):
+        (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
+        * fileapi/ThreadableBlobRegistry.cpp:
+        (WebCore::BlobRegistryContext::BlobRegistryContext):
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
+        * html/parser/HTMLResourcePreloader.h:
+        (WebCore::PreloadRequest::PreloadRequest):
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::init):
+        * platform/CrossThreadCopier.cpp:
+        (WebCore::URL>::copy):
+        * platform/URL.cpp:
+        (WebCore::URL::isolatedCopy):
+        (WebCore::URL::copy): Deleted.
+        * platform/URL.h:
+        (WebCore::URLCapture::URLCapture):
+        * platform/network/BlobPart.h:
+        (WebCore::BlobPart::detachFromCurrentThread):
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::copyData):
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::copyData):
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
+
 2015-05-06  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r183894.

Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (183900 => 183901)


--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -140,7 +140,7 @@
 
 void WebSocketHandshake::setURL(const URL& url)
 {
-    m_url = url.copy();
+    m_url = url.isolatedCopy();
 }
 
 const String WebSocketHandshake::host() const
@@ -383,7 +383,7 @@
 
 URL WebSocketHandshake::httpURLForAuthenticationAndCookies() const
 {
-    URL url = ""
+    URL url = ""
     bool couldSetProtocol = url.setProtocol(m_secure ? "https" : "http");
     ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
     return url;

Modified: trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (183900 => 183901)


--- trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -52,7 +52,7 @@
     WTF_MAKE_FAST_ALLOCATED;
 public:
     BlobRegistryContext(const URL& url, Vector<BlobPart> blobParts, const String& contentType)
-        : url(url.copy())
+        : url(url.isolatedCopy())
         , contentType(contentType.isolatedCopy())
         , blobParts(WTF::move(blobParts))
     {
@@ -61,18 +61,18 @@
     }
 
     BlobRegistryContext(const URL& url, const URL& srcURL)
-        : url(url.copy())
-        , srcURL(srcURL.copy())
+        : url(url.isolatedCopy())
+        , srcURL(srcURL.isolatedCopy())
     {
     }
 
     BlobRegistryContext(const URL& url)
-        : url(url.copy())
+        : url(url.isolatedCopy())
     {
     }
 
     BlobRegistryContext(const URL& url, const String& path, const String& contentType)
-        : url(url.copy())
+        : url(url.isolatedCopy())
         , path(path.isolatedCopy())
         , contentType(contentType.isolatedCopy())
     {

Modified: trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp (183900 => 183901)


--- trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -312,7 +312,7 @@
 {
     ASSERT(m_predictedBaseElementURL.isEmpty());
     if (auto* hrefAttribute = findAttribute(token.attributes(), hrefAttr.localName().string()))
-        m_predictedBaseElementURL = URL(m_documentURL, stripLeadingAndTrailingHTMLSpaces(StringImpl::create8BitIfPossible(hrefAttribute->value))).copy();
+        m_predictedBaseElementURL = URL(m_documentURL, stripLeadingAndTrailingHTMLSpaces(StringImpl::create8BitIfPossible(hrefAttribute->value))).isolatedCopy();
 }
 
 HTMLPreloadScanner::HTMLPreloadScanner(const HTMLParserOptions& options, const URL& documentURL, float deviceScaleFactor)

Modified: trunk/Source/WebCore/html/parser/HTMLResourcePreloader.h (183900 => 183901)


--- trunk/Source/WebCore/html/parser/HTMLResourcePreloader.h	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/html/parser/HTMLResourcePreloader.h	2015-05-07 00:28:22 UTC (rev 183901)
@@ -36,7 +36,7 @@
     PreloadRequest(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
         : m_initiator(initiator)
         , m_resourceURL(resourceURL)
-        , m_baseURL(baseURL.copy())
+        , m_baseURL(baseURL.isolatedCopy())
         , m_resourceType(resourceType)
         , m_mediaAttribute(mediaAttribute)
         , m_crossOriginModeAllowsCookies(false)

Modified: trunk/Source/WebCore/html/parser/XSSAuditor.cpp (183900 => 183901)


--- trunk/Source/WebCore/html/parser/XSSAuditor.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/html/parser/XSSAuditor.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -244,7 +244,7 @@
     if (!m_isEnabled)
         return;
 
-    m_documentURL = document->url().copy();
+    m_documentURL = document->url().isolatedCopy();
 
     // In theory, the Document could have detached from the Frame after the
     // XSSAuditor was constructed.
@@ -300,7 +300,7 @@
         m_xssProtection = combineXSSProtectionHeaderAndCSP(xssProtectionHeader, cspHeader);
         // FIXME: Combine the two report URLs in some reasonable way.
         if (auditorDelegate)
-            auditorDelegate->setReportURL(xssProtectionReportURL.copy());
+            auditorDelegate->setReportURL(xssProtectionReportURL.isolatedCopy());
         FormData* httpBody = documentLoader->originalRequest().httpBody();
         if (httpBody && !httpBody->isEmpty()) {
             httpBodyAsString = httpBody->flattenToString();

Modified: trunk/Source/WebCore/platform/CrossThreadCopier.cpp (183900 => 183901)


--- trunk/Source/WebCore/platform/CrossThreadCopier.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -52,7 +52,7 @@
 
 CrossThreadCopierBase<false, false, URL>::Type CrossThreadCopierBase<false, false, URL>::copy(const URL& url)
 {
-    return url.copy();
+    return url.isolatedCopy();
 }
 
 CrossThreadCopierBase<false, false, String>::Type CrossThreadCopierBase<false, false, String>::copy(const String& str)

Modified: trunk/Source/WebCore/platform/URL.cpp (183900 => 183901)


--- trunk/Source/WebCore/platform/URL.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/URL.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -648,7 +648,7 @@
     }
 }
 
-URL URL::copy() const
+URL URL::isolatedCopy() const
 {
     URL result = *this;
     result.m_string = result.m_string.isolatedCopy();

Modified: trunk/Source/WebCore/platform/URL.h (183900 => 183901)


--- trunk/Source/WebCore/platform/URL.h	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/URL.h	2015-05-07 00:28:22 UTC (rev 183901)
@@ -83,9 +83,8 @@
 
     // Makes a deep copy. Helpful only if you need to use a URL on another
     // thread. Since the underlying StringImpl objects are immutable, there's
-    // no other reason to ever prefer copy() over plain old assignment.
-    // FIXME: Rename to isolatedCopy to match String.
-    URL copy() const;
+    // no other reason to ever prefer isolatedCopy() over plain old assignment.
+    URL isolatedCopy() const;
 
     bool isNull() const;
     bool isEmpty() const;
@@ -381,7 +380,7 @@
 }
 
 inline URLCapture::URLCapture(const URLCapture& other)
-    : m_URL(other.m_URL.copy())
+    : m_URL(other.m_URL.isolatedCopy())
 {
 }
 

Modified: trunk/Source/WebCore/platform/network/BlobPart.h (183900 => 183901)


--- trunk/Source/WebCore/platform/network/BlobPart.h	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/network/BlobPart.h	2015-05-07 00:28:22 UTC (rev 183901)
@@ -76,7 +76,7 @@
 
     void detachFromCurrentThread()
     {
-        m_url = m_url.copy();
+        m_url = m_url.isolatedCopy();
     }
 
 private:

Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (183900 => 183901)


--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -84,10 +84,10 @@
 std::unique_ptr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const
 {
     auto data = ""
-    data->url = ""
+    data->url = ""
     data->cachePolicy = m_cachePolicy;
     data->timeoutInterval = timeoutInterval();
-    data->firstPartyForCookies = firstPartyForCookies().copy();
+    data->firstPartyForCookies = firstPartyForCookies().isolatedCopy();
     data->httpMethod = httpMethod().isolatedCopy();
     data->httpHeaders = httpHeaderFields().copyData();
     data->priority = m_priority;

Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (183900 => 183901)


--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -83,7 +83,7 @@
 std::unique_ptr<CrossThreadResourceResponseData> ResourceResponseBase::copyData() const
 {
     auto data = ""
-    data->m_url = url().copy();
+    data->m_url = url().isolatedCopy();
     data->m_mimeType = mimeType().isolatedCopy();
     data->m_expectedContentLength = expectedContentLength();
     data->m_textEncodingName = textEncodingName().isolatedCopy();

Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (183900 => 183901)


--- trunk/Source/WebCore/workers/WorkerThread.cpp	2015-05-07 00:26:48 UTC (rev 183900)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp	2015-05-07 00:28:22 UTC (rev 183901)
@@ -87,7 +87,7 @@
 };
 
 WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
-    : m_scriptURL(scriptURL.copy())
+    : m_scriptURL(scriptURL.isolatedCopy())
     , m_userAgent(userAgent.isolatedCopy())
     , m_sourceCode(sourceCode.isolatedCopy())
     , m_startMode(startMode)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to