The primary motivation has been long strings that can be formed in workers which need to be passed to the main thread, but this should benefit other places as well.
Created attachment 40667 [details] Proposed fix.
This is in support of finally implementing WorkerContext::resourceRetrievedByXMLHttpRequest and WorkerContext::scriptImported.
One nit: > diff --git a/WebCore/storage/StorageNamespaceImpl.cpp b/WebCore/storage/StorageNamespaceImpl.cpp > index bc9d90c..ab540f1 100644 > --- a/WebCore/storage/StorageNamespaceImpl.cpp > +++ b/WebCore/storage/StorageNamespaceImpl.cpp > @@ -65,7 +65,7 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::sessionStorageNamespace() > > StorageNamespaceImpl::StorageNamespaceImpl(StorageType storageType, const String& path, unsigned quota) > : m_storageType(storageType) > - , m_path(path.copy()) // Copy makes it safe for our other thread to access the path. > + , m_path(path.crossThreadString()) // Make it safe for our other thread to access the path. This comment seems redundant now.
Comment on attachment 40667 [details] Proposed fix. Just marking as cq- because I want to land this myself.
"call was made threadsafeCopy unless I could show that *threadsafey* wasn't needed."
Committed as http://trac.webkit.org/changeset/49160.