Removed SharedUChar and tightened language around its previous uses
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2011 03:54:15 +0000 (03:54 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2011 03:54:15 +0000 (03:54 +0000)
commitbd2b53b8337585b0e78b3c04d757099bff66357f
tree2a95a5a131e570ab2ce756eb8ab6eefc2b87dd61
parent5f62d058407fcc52c2b7b84f2870b44b752207a9
Removed SharedUChar and tightened language around its previous uses
https://bugs.webkit.org/show_bug.cgi?id=70698

Reviewed by David Levin.

Source/JavaScriptCore:

- Removed SharedUChar because most of its functionality has moved into
other abstraction layers, and we want remaining clients to choose their
abstractions explicitly instead of relying on StringImpl to provide this
behavior implicitly, since we think they can sometimes make more efficient
choices.

- Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
the former names could give the impression that the resulting object was
thread-safe, but actually it's just an isolated copy, which is not
thread-safe by itself, but can be used to implement a thread-safe
algorithm through isolation.

* wtf/CrossThreadRefCounted.h: Removed.

* JavaScriptCore.exp: Export!

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl): Removed the stuff mentioned above.

* wtf/text/StringImpl.h:
(WTF::StringImpl::length): Ditto.

(WTF::StringImpl::isolatedCopy): Inlined this, since it's now trivial.

* wtf/text/WTFString.cpp:
(WTF::String::isolatedCopy):
* wtf/text/WTFString.h: Updated for StringImpl changes.

* API/OpaqueJSString.h:
* GNUmakefile.list.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.order:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/OwnFastMallocPtr.h:
* wtf/RefCounted.h:
* wtf/SizeLimits.cpp:
* wtf/ThreadSafeRefCounted.h:
* wtf/wtf.pri:
* yarr/YarrPattern.h: Updated these files to accomodate removal of
CrossThreadRefCounted.h.

Source/WebCore:

- Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
the former names gave the dangerous misimpression that the resulting object
was thread-safe, which is not true.

- Updated a bunch of files for header dependency changes, now that
CrossThreadRefCounted is gone.

* ForwardingHeaders/wtf/CrossThreadRefCounted.h: Removed.
* WebCore.exp.in:
* bindings/js/ScriptHeapSnapshot.h:
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::release):
(WebCore::SerializedScriptValue::SerializedScriptValue):
* css/CSSPropertySourceData.h:
* css/CSSValue.h:
* css/StyleMedia.h:
* css/WebKitCSSMatrix.h:
* dom/QualifiedName.h:
* fileapi/LocalFileSystem.h:
(WebCore::LocalFileSystem::SystemBasePath::operator String):
* history/CachedFrame.h:
* history/CachedPage.h:
* history/HistoryItem.h:
* html/canvas/CanvasStyle.h:
* inspector/InspectorResourceAgent.h:
* loader/FormState.h:
* loader/TextResourceDecoder.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::synchronousIconForPageURL):
(WebCore::IconDatabase::synchronousIconURLForPageURL):
(WebCore::IconDatabase::retainIconForPageURL):
(WebCore::IconDatabase::releaseIconForPageURL):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::databasePath):
(WebCore::IconDatabase::defaultDatabaseFilename):
(WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem):
(WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem):
* page/ContentSecurityPolicy.h:
* page/Coordinates.h:
(WebCore::Coordinates::isolatedCopy):
* page/Geoposition.h:
(WebCore::Geoposition::isolatedCopy):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::isolatedCopy):
* page/SecurityOrigin.h:
* page/animation/AnimationBase.h:
* platform/CrossThreadCopier.cpp:
(WebCore::::copy):
* platform/FileChooser.h:
* platform/KURL.cpp:
(WebCore::KURL::copy):
* platform/cf/SchedulePair.h:
* platform/network/BlobData.cpp:
(WebCore::BlobDataItem::detachFromCurrentThread):
(WebCore::BlobData::detachFromCurrentThread):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
* platform/network/MIMEHeader.h:
* platform/network/ResourceErrorBase.cpp:
(WebCore::ResourceErrorBase::copy):
* platform/network/ResourceLoadInfo.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::copyData):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::copyData):
* platform/sql/SQLValue.cpp:
(WebCore::SQLValue::SQLValue):
(WebCore::SQLValue::string):
* rendering/style/QuotesData.h:
* storage/AbstractDatabase.cpp:
(WebCore::updateGuidVersionMap):
(WebCore::AbstractDatabase::AbstractDatabase):
(WebCore::AbstractDatabase::performOpenAndVerify):
(WebCore::AbstractDatabase::stringIdentifier):
(WebCore::AbstractDatabase::displayName):
(WebCore::AbstractDatabase::fileName):
(WebCore::AbstractDatabase::setExpectedVersion):
(WebCore::AbstractDatabase::getCachedVersion):
* storage/ChangeVersionWrapper.cpp:
(WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
* storage/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::tableNames):
* storage/DatabaseDetails.h:
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::setDatabaseDirectoryPath):
(WebCore::DatabaseTracker::databaseDirectoryPath):
(WebCore::DatabaseTracker::trackerDatabasePath):
(WebCore::DatabaseTracker::canEstablishDatabase):
(WebCore::DatabaseTracker::originPath):
(WebCore::DatabaseTracker::fullPathForDatabase):
(WebCore::DatabaseTracker::populateOrigins):
(WebCore::DatabaseTracker::databaseNamesForOrigin):
(WebCore::DatabaseTracker::addOpenDatabase):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::recordCreatingDatabase):
(WebCore::DatabaseTracker::recordDeletingDatabase):
(WebCore::DatabaseTracker::recordDeletingOrigin):
(WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
* storage/OriginQuotaManager.cpp:
(WebCore::OriginQuotaManager::trackOrigin):
(WebCore::OriginQuotaManager::addDatabase):
* storage/SQLError.h:
(WebCore::SQLError::message):
(WebCore::SQLError::SQLError):
* storage/SQLResultSetRowList.h:
* storage/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::syncTimerFired):
* storage/StorageAreaSync.h:
* storage/StorageMap.cpp:
(WebCore::StorageMap::importItem):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::StorageSyncManager):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::StorageTracker):
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::willDeleteAllOrigins):
* svg/SVGPathSeg.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::url):
(WebCore::SharedWorkerProxy::name):
(WebCore::SharedWorkerProxy::SharedWorkerProxy):
(WebCore::DefaultSharedWorkerRepository::getProxy):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::SharedWorkerThread):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::WorkerExceptionTask):
(WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):

Source/WebKit/chromium:

- Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
the former names gave the dangerous misimpression that the resulting object
was thread-safe, which is not true.

* src/WorkerFileSystemCallbacksBridge.cpp:

Source/WebKit/mac:

- Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
the former names gave the dangerous misimpression that the resulting object
was thread-safe, which is not true.

* Storage/WebDatabaseTrackerClient.mm:
(DidModifyOriginData::dispatchToMainThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
89 files changed:
Source/JavaScriptCore/API/OpaqueJSString.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.order
Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/wtf/CMakeLists.txt
Source/JavaScriptCore/wtf/CrossThreadRefCounted.h [deleted file]
Source/JavaScriptCore/wtf/OwnFastMallocPtr.h
Source/JavaScriptCore/wtf/RefCounted.h
Source/JavaScriptCore/wtf/SizeLimits.cpp
Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h
Source/JavaScriptCore/wtf/text/StringImpl.cpp
Source/JavaScriptCore/wtf/text/StringImpl.h
Source/JavaScriptCore/wtf/text/WTFString.cpp
Source/JavaScriptCore/wtf/text/WTFString.h
Source/JavaScriptCore/wtf/wtf.pri
Source/JavaScriptCore/yarr/YarrPattern.h
Source/JavaScriptGlue/ForwardingHeaders/wtf/CrossThreadRefCounted.h [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/wtf/CrossThreadRefCounted.h [deleted file]
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/ScriptHeapSnapshot.h
Source/WebCore/bindings/v8/JavaScriptCallFrame.h
Source/WebCore/bindings/v8/ScriptHeapSnapshot.h
Source/WebCore/bindings/v8/ScriptProfile.h
Source/WebCore/bindings/v8/ScriptProfileNode.h
Source/WebCore/bindings/v8/SerializedScriptValue.cpp
Source/WebCore/css/CSSPropertySourceData.h
Source/WebCore/css/CSSValue.h
Source/WebCore/css/StyleMedia.h
Source/WebCore/css/WebKitCSSMatrix.h
Source/WebCore/dom/QualifiedName.h
Source/WebCore/fileapi/LocalFileSystem.h
Source/WebCore/history/CachedFrame.h
Source/WebCore/history/CachedPage.h
Source/WebCore/history/HistoryItem.h
Source/WebCore/html/canvas/CanvasStyle.h
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/loader/FormState.h
Source/WebCore/loader/TextResourceDecoder.h
Source/WebCore/loader/WorkerThreadableLoader.cpp
Source/WebCore/loader/icon/IconDatabase.cpp
Source/WebCore/page/ContentSecurityPolicy.h
Source/WebCore/page/Coordinates.h
Source/WebCore/page/Geoposition.h
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/page/SecurityOrigin.h
Source/WebCore/page/animation/AnimationBase.h
Source/WebCore/platform/CrossThreadCopier.cpp
Source/WebCore/platform/FileChooser.h
Source/WebCore/platform/KURL.cpp
Source/WebCore/platform/cf/SchedulePair.h
Source/WebCore/platform/network/BlobData.cpp
Source/WebCore/platform/network/HTTPHeaderMap.cpp
Source/WebCore/platform/network/MIMEHeader.h
Source/WebCore/platform/network/ResourceErrorBase.cpp
Source/WebCore/platform/network/ResourceLoadInfo.h
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/sql/SQLValue.cpp
Source/WebCore/rendering/style/QuotesData.h
Source/WebCore/storage/AbstractDatabase.cpp
Source/WebCore/storage/ChangeVersionWrapper.cpp
Source/WebCore/storage/Database.cpp
Source/WebCore/storage/DatabaseDetails.h
Source/WebCore/storage/DatabaseTracker.cpp
Source/WebCore/storage/OriginQuotaManager.cpp
Source/WebCore/storage/SQLError.h
Source/WebCore/storage/SQLResultSetRowList.h
Source/WebCore/storage/SQLStatement.cpp
Source/WebCore/storage/StorageAreaSync.cpp
Source/WebCore/storage/StorageAreaSync.h
Source/WebCore/storage/StorageMap.cpp
Source/WebCore/storage/StorageNamespaceImpl.cpp
Source/WebCore/storage/StorageSyncManager.cpp
Source/WebCore/storage/StorageTracker.cpp
Source/WebCore/svg/SVGPathSeg.h
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/SharedWorkerThread.cpp
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerRunLoop.cpp
Source/WebCore/workers/WorkerThread.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Storage/WebDatabaseTrackerClient.mm