Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (194427 => 194428)
--- trunk/Source/_javascript_Core/ChangeLog 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1,3 +1,25 @@
+2015-12-25 Andy Estes <[email protected]>
+
+ Stop moving local objects in return statements
+ https://bugs.webkit.org/show_bug.cgi?id=152557
+
+ Reviewed by Brady Eidson.
+
+ Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
+
+ Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
+ I found these issues by temporarily replacing WTF::move with std::move and recompiling.
+
+ * inspector/ScriptCallStack.cpp:
+ (Inspector::ScriptCallStack::buildInspectorArray):
+ * inspector/agents/InspectorScriptProfilerAgent.cpp:
+ (Inspector::buildInspectorObject):
+ * jit/CallFrameShuffler.h:
+ (JSC::CallFrameShuffler::snapshot):
+ * runtime/TypeSet.cpp:
+ (JSC::TypeSet::allStructureRepresentations):
+ (JSC::StructureShape::inspectorRepresentation):
+
2015-12-26 Mark Lam <[email protected]>
Rename NodeMayOverflowInXXX to NodeMayOverflowInt32InXXX.
Modified: trunk/Source/_javascript_Core/inspector/ScriptCallStack.cpp (194427 => 194428)
--- trunk/Source/_javascript_Core/inspector/ScriptCallStack.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/_javascript_Core/inspector/ScriptCallStack.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -111,7 +111,7 @@
auto frames = Inspector::Protocol::Console::StackTrace::create();
for (size_t i = 0; i < m_frames.size(); i++)
frames->addItem(m_frames.at(i).buildInspectorObject());
- return WTF::move(frames);
+ return frames;
}
} // namespace Inspector
Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorScriptProfilerAgent.cpp (194427 => 194428)
--- trunk/Source/_javascript_Core/inspector/agents/InspectorScriptProfilerAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorScriptProfilerAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -181,7 +181,7 @@
result->setChildren(WTF::move(children));
}
- return WTF::move(result);
+ return result;
}
static Ref<Protocol::Timeline::CPUProfile> buildProfileInspectorObject(const JSC::Profile* profile)
Modified: trunk/Source/_javascript_Core/jit/CallFrameShuffler.h (194427 => 194428)
--- trunk/Source/_javascript_Core/jit/CallFrameShuffler.h 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/_javascript_Core/jit/CallFrameShuffler.h 2015-12-28 16:26:24 UTC (rev 194428)
@@ -117,7 +117,7 @@
RELEASE_ASSERT_NOT_REACHED();
#endif
}
- return WTF::move(data);
+ return data;
}
// Ask the shuffler to put the callee into some registers once the
Modified: trunk/Source/_javascript_Core/runtime/TypeSet.cpp (194427 => 194428)
--- trunk/Source/_javascript_Core/runtime/TypeSet.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/_javascript_Core/runtime/TypeSet.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -224,7 +224,7 @@
for (size_t i = 0; i < m_structureHistory.size(); i++)
description->addItem(m_structureHistory.at(i)->inspectorRepresentation());
- return WTF::move(description);
+ return description;
}
Ref<Inspector::Protocol::Runtime::TypeSet> TypeSet::inspectorTypeSet() const
@@ -523,7 +523,7 @@
currentShape = currentShape->m_proto;
}
- return WTF::move(base);
+ return base;
}
bool StructureShape::hasSamePrototypeChain(PassRefPtr<StructureShape> prpOther)
Modified: trunk/Source/WTF/ChangeLog (194427 => 194428)
--- trunk/Source/WTF/ChangeLog 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WTF/ChangeLog 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1,3 +1,12 @@
+2015-12-25 Andy Estes <[email protected]>
+
+ Stop moving local objects in return statements
+ https://bugs.webkit.org/show_bug.cgi?id=152557
+
+ Reviewed by Brady Eidson.
+
+ * wtf/StdLibExtras.h: Added a FIXME about how using WTF::move() prevents several Clang diagnostics from emitting useful warnings.
+
2015-12-22 Filip Pizlo <[email protected]>
FTL B3 should be able to run richards
Modified: trunk/Source/WTF/wtf/StdLibExtras.h (194427 => 194428)
--- trunk/Source/WTF/wtf/StdLibExtras.h 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WTF/wtf/StdLibExtras.h 2015-12-28 16:26:24 UTC (rev 194428)
@@ -111,6 +111,8 @@
namespace WTF {
+// FIXME: Using this function prevents Clang's move diagnostics (-Wpessimizing-move, -Wredundant-move, -Wself-move) from
+// finding mistakes, since these diagnostics only evaluate calls to std::move().
template<typename T>
ALWAYS_INLINE typename std::remove_reference<T>::type&& move(T&& value)
{
Modified: trunk/Source/WebCore/ChangeLog (194427 => 194428)
--- trunk/Source/WebCore/ChangeLog 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/ChangeLog 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1,3 +1,115 @@
+2015-12-25 Andy Estes <[email protected]>
+
+ Stop moving local objects in return statements
+ https://bugs.webkit.org/show_bug.cgi?id=152557
+
+ Reviewed by Brady Eidson.
+
+ Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
+
+ Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
+ I found these issues by temporarily replacing WTF::move with std::move and recompiling.
+
+ * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
+ (WebCore::IDBDatabaseIdentifier::isolatedCopy):
+ * Modules/indexeddb/IDBKeyData.cpp:
+ (WebCore::IDBKeyData::deletedValue):
+ * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+ (WebCore::IDBClient::IDBDatabase::objectStoreNames):
+ (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::createObjectStore):
+ (WebCore::IDBClient::IDBTransaction::createIndex):
+ (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
+ (WebCore::IDBClient::IDBTransaction::requestGetRecord):
+ (WebCore::IDBClient::IDBTransaction::requestIndexRecord):
+ (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
+ (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
+ * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
+ (WebCore::IDBDatabaseInfo::isolatedCopy):
+ (WebCore::IDBDatabaseInfo::objectStoreNames):
+ * Modules/indexeddb/shared/IDBResultData.cpp:
+ (WebCore::IDBResultData::error):
+ (WebCore::IDBResultData::openDatabaseSuccess):
+ (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
+ * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
+ (WebCore::IDBTransactionInfo::versionChange):
+ (WebCore::IDBTransactionInfo::isolatedCopy):
+ * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+ (WebCore::InProcessIDBServer::create):
+ * Modules/webaudio/OfflineAudioContext.cpp:
+ (WebCore::OfflineAudioContext::create):
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::originLockFor):
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::create):
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::formatNumberValue):
+ * dom/NodeOrString.cpp:
+ (WebCore::convertNodesOrStringsIntoNode):
+ * inspector/InspectorApplicationCacheAgent.cpp:
+ (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode):
+ (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
+ (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+ * inspector/InspectorIndexedDBAgent.cpp:
+ * inspector/InspectorLayerTreeAgent.cpp:
+ (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
+ * inspector/InspectorNetworkAgent.cpp:
+ (WebCore::buildObjectForHeaders):
+ (WebCore::buildObjectForResourceRequest):
+ (WebCore::buildObjectForCachedResource):
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::buildArrayForQuad):
+ (WebCore::buildObjectForFlowRegions):
+ (WebCore::InspectorOverlay::buildObjectForHighlightedNodes):
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::createXHRTextDecoder):
+ (WebCore::buildArrayForCookies):
+ (WebCore::InspectorPageAgent::buildObjectForFrame):
+ * inspector/InspectorStyleSheet.cpp:
+ (WebCore::buildMediaObject):
+ (WebCore::InspectorStyle::buildArrayForComputedStyle):
+ (WebCore::buildObjectForSelectorHelper):
+ (WebCore::selectorsFromSource):
+ (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
+ (WebCore::InspectorStyleSheet::buildObjectForStyle):
+ (WebCore::InspectorStyleSheet::buildArrayForRuleList):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::stopFromConsole):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createGenericRecord):
+ (WebCore::TimelineRecordFactory::createFunctionCallData):
+ (WebCore::TimelineRecordFactory::createConsoleProfileData):
+ (WebCore::TimelineRecordFactory::createProbeSampleData):
+ (WebCore::TimelineRecordFactory::createEventDispatchData):
+ (WebCore::TimelineRecordFactory::createGenericTimerData):
+ (WebCore::TimelineRecordFactory::createTimerInstallData):
+ (WebCore::TimelineRecordFactory::createEvaluateScriptData):
+ (WebCore::TimelineRecordFactory::createTimeStampData):
+ (WebCore::TimelineRecordFactory::createAnimationFrameData):
+ (WebCore::createQuad):
+ (WebCore::TimelineRecordFactory::createPaintData):
+ (WebCore::buildInspectorObject):
+ * loader/FrameLoader.cpp:
+ (WebCore::createWindow):
+ * loader/NavigationAction.cpp:
+ (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::createWindow):
+ * platform/network/ios/QuickLook.mm:
+ (WebCore::QuickLookHandle::create):
+ * testing/Internals.cpp:
+ (WebCore::Internals::openDummyInspectorFrontend):
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::WorkerScriptLoader::createResourceRequest):
+ * xml/XPathExpression.cpp:
+ (WebCore::XPathExpression::evaluate):
+
2015-12-27 Zalan Bujtas <[email protected]>
Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -52,7 +52,7 @@
identifier.m_openingOrigin = m_openingOrigin.isolatedCopy();
identifier.m_mainFrameOrigin = m_mainFrameOrigin.isolatedCopy();
- return WTF::move(identifier);
+ return identifier;
}
#ifndef NDEBUG
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -324,7 +324,7 @@
IDBKeyData result;
result.m_isNull = false;
result.m_isDeletedValue = true;
- return WTF::move(result);
+ return result;
}
bool IDBKeyData::operator<(const IDBKeyData& rhs) const
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -84,7 +84,7 @@
for (auto& name : m_info.objectStoreNames())
objectStoreNames->append(name);
objectStoreNames->sort();
- return WTF::move(objectStoreNames);
+ return objectStoreNames;
}
RefPtr<WebCore::IDBObjectStore> IDBDatabase::createObjectStore(const String&, const Dictionary&, ExceptionCodeWithMessage&)
@@ -266,7 +266,7 @@
m_activeTransactions.set(transaction->info().identifier(), &transaction.get());
- return WTF::move(transaction);
+ return transaction;
}
void IDBDatabase::didStartTransaction(IDBTransaction& transaction)
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -444,7 +444,7 @@
auto operation = createTransactionOperation(*this, &IDBTransaction::didCreateObjectStoreOnServer, &IDBTransaction::createObjectStoreOnServer, info);
scheduleOperation(WTF::move(operation));
- return WTF::move(objectStore);
+ return objectStore;
}
void IDBTransaction::createObjectStoreOnServer(TransactionOperation& operation, const IDBObjectStoreInfo& info)
@@ -473,7 +473,7 @@
auto operation = createTransactionOperation(*this, &IDBTransaction::didCreateIndexOnServer, &IDBTransaction::createIndexOnServer, info);
scheduleOperation(WTF::move(operation));
- return WTF::move(index);
+ return index;
}
void IDBTransaction::createIndexOnServer(TransactionOperation& operation, const IDBIndexInfo& info)
@@ -529,7 +529,7 @@
auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didOpenCursorOnServer, &IDBTransaction::openCursorOnServer, cursor->info());
scheduleOperation(WTF::move(operation));
- return WTF::move(request);
+ return request;
}
void IDBTransaction::openCursorOnServer(TransactionOperation& operation, const IDBCursorInfo& info)
@@ -584,7 +584,7 @@
auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, keyRangeData);
scheduleOperation(WTF::move(operation));
- return WTF::move(request);
+ return request;
}
Ref<IDBRequest> IDBTransaction::requestGetValue(ScriptExecutionContext& context, IDBIndex& index, const IDBKeyRangeData& range)
@@ -611,7 +611,7 @@
auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, range);
scheduleOperation(WTF::move(operation));
- return WTF::move(request);
+ return request;
}
void IDBTransaction::getRecordOnServer(TransactionOperation& operation, const IDBKeyRangeData& keyRange)
@@ -732,7 +732,7 @@
auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didClearObjectStoreOnServer, &IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier);
scheduleOperation(WTF::move(operation));
- return WTF::move(request);
+ return request;
}
void IDBTransaction::clearObjectStoreOnServer(TransactionOperation& operation, const uint64_t& objectStoreIdentifier)
@@ -763,7 +763,7 @@
auto operation = createTransactionOperation(*this, request.get(), &IDBTransaction::didPutOrAddOnServer, &IDBTransaction::putOrAddOnServer, key, &value, overwriteMode);
scheduleOperation(WTF::move(operation));
- return WTF::move(request);
+ return request;
}
void IDBTransaction::putOrAddOnServer(TransactionOperation& operation, RefPtr<IDBKey> key, RefPtr<SerializedScriptValue> value, const IndexedDB::ObjectStoreOverwriteMode& overwriteMode)
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1085,13 +1085,13 @@
hadDeferredTransactions = !deferredTransactions.isEmpty();
if (!hadDeferredTransactions)
- return WTF::move(currentTransaction);
+ return currentTransaction;
// Prepend the deferred transactions back on the beginning of the deque for future scheduling passes.
while (!deferredTransactions.isEmpty())
m_pendingTransactions.prepend(deferredTransactions.takeLast());
- return WTF::move(currentTransaction);
+ return currentTransaction;
}
void UniqueIDBDatabase::inProgressTransactionCompleted(const IDBResourceIdentifier& transactionIdentifier)
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -47,7 +47,7 @@
info.m_name = m_name.isolatedCopy();
info.m_version = m_version;
- return WTF::move(info);
+ return info;
}
bool IDBDatabaseInfo::hasObjectStore(const String& name) const
@@ -123,7 +123,7 @@
for (auto& objectStore : m_objectStoreMap.values())
names.uncheckedAppend(objectStore.name());
- return WTF::move(names);
+ return names;
}
void IDBDatabaseInfo::deleteObjectStore(const String& objectStoreName)
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -67,7 +67,7 @@
IDBResultData result(requestIdentifier);
result.m_type = IDBResultType::Error;
result.m_error = error;
- return WTF::move(result);
+ return result;
}
IDBResultData IDBResultData::openDatabaseSuccess(const IDBResourceIdentifier& requestIdentifier, IDBServer::UniqueIDBDatabaseConnection& connection)
@@ -76,7 +76,7 @@
result.m_type = IDBResultType::OpenDatabaseSuccess;
result.m_databaseConnectionIdentifier = connection.identifier();
result.m_databaseInfo = std::make_unique<IDBDatabaseInfo>(connection.database().info());
- return WTF::move(result);
+ return result;
}
@@ -87,7 +87,7 @@
result.m_databaseConnectionIdentifier = transaction.databaseConnection().identifier();
result.m_databaseInfo = std::make_unique<IDBDatabaseInfo>(transaction.databaseConnection().database().info());
result.m_transactionInfo = std::make_unique<IDBTransactionInfo>(transaction.info());
- return WTF::move(result);
+ return result;
}
IDBResultData IDBResultData::deleteDatabaseSuccess(const IDBResourceIdentifier& requestIdentifier, const IDBDatabaseInfo& info)
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -53,7 +53,7 @@
result.m_newVersion = newVersion;
result.m_originalDatabaseInfo = std::make_unique<IDBDatabaseInfo>(originalDatabaseInfo);
- return WTF::move(result);
+ return result;
}
IDBTransactionInfo::IDBTransactionInfo(const IDBTransactionInfo& info)
@@ -79,7 +79,7 @@
if (m_originalDatabaseInfo)
result.m_originalDatabaseInfo = std::make_unique<IDBDatabaseInfo>(*m_originalDatabaseInfo);
- return WTF::move(result);
+ return result;
}
#ifndef NDEBUG
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -44,7 +44,7 @@
{
Ref<InProcessIDBServer> server = adoptRef(*new InProcessIDBServer);
server->m_server->registerConnection(server->connectionToClient());
- return WTF::move(server);
+ return server;
}
InProcessIDBServer::InProcessIDBServer()
Modified: trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -51,7 +51,7 @@
RefPtr<OfflineAudioContext> audioContext(adoptRef(new OfflineAudioContext(document, numberOfChannels, numberOfFrames, sampleRate)));
audioContext->suspendIfNeeded();
- return WTF::move(audioContext);
+ return audioContext;
}
OfflineAudioContext::OfflineAudioContext(Document& document, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate)
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -667,7 +667,7 @@
ASSERT(lock);
addResult.iterator->value = lock;
- return WTF::move(lock);
+ return lock;
}
void DatabaseTracker::deleteOriginLockFor(SecurityOrigin* origin)
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (194427 => 194428)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -183,7 +183,7 @@
if (ec)
return nullptr;
- return WTF::move(webSocket);
+ return webSocket;
}
RefPtr<WebSocket> WebSocket::create(ScriptExecutionContext& context, const String& url, const String& protocol, ExceptionCode& ec)
Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (194427 => 194428)
--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -976,7 +976,7 @@
for (unsigned i = 0; i < suffixLength; ++i)
buffer[length + i] = static_cast<LChar>(suffix[i]);
- return WTF::move(string);
+ return string;
}
template <unsigned characterCount>
Modified: trunk/Source/WebCore/dom/NodeOrString.cpp (194427 => 194428)
--- trunk/Source/WebCore/dom/NodeOrString.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/dom/NodeOrString.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -61,7 +61,7 @@
}
}
- return WTF::move(nodeToReturn);
+ return nodeToReturn;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -164,7 +164,7 @@
for (const auto& resourceInfo : applicationCacheResources)
resources->addItem(buildObjectForApplicationCacheResource(resourceInfo));
- return WTF::move(resources);
+ return resources;
}
Ref<Inspector::Protocol::ApplicationCache::ApplicationCacheResource> InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo& resourceInfo)
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1376,7 +1376,7 @@
value->setRole(axObject->computedRoleString());
}
- return WTF::move(value);
+ return value;
}
Ref<Inspector::Protocol::Array<String>> InspectorDOMAgent::buildArrayForElementAttributes(Element* element)
@@ -1384,13 +1384,13 @@
auto attributesValue = Inspector::Protocol::Array<String>::create();
// Go through all attributes and serialize them.
if (!element->hasAttributes())
- return WTF::move(attributesValue);
+ return attributesValue;
for (const Attribute& attribute : element->attributesIterator()) {
// Add attribute pair
attributesValue->addItem(attribute.name().toString());
attributesValue->addItem(attribute.value());
}
- return WTF::move(attributesValue);
+ return attributesValue;
}
Ref<Inspector::Protocol::Array<Inspector::Protocol::DOM::Node>> InspectorDOMAgent::buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap)
@@ -1403,7 +1403,7 @@
children->addItem(buildObjectForNode(firstChild, 0, nodesMap));
m_childrenRequested.add(bind(container, nodesMap));
}
- return WTF::move(children);
+ return children;
}
Node* child = innerFirstChild(container);
@@ -1414,7 +1414,7 @@
children->addItem(buildObjectForNode(child, depth, nodesMap));
child = innerNextSibling(child);
}
- return WTF::move(children);
+ return children;
}
RefPtr<Inspector::Protocol::Array<Inspector::Protocol::DOM::Node>> InspectorDOMAgent::buildArrayForPseudoElements(const Element& element, NodeToIdMap* nodesMap)
@@ -1481,7 +1481,7 @@
if (!sourceName.isEmpty())
value->setSourceName(sourceName);
}
- return WTF::move(value);
+ return value;
}
void InspectorDOMAgent::processAccessibilityChildren(RefPtr<AccessibilityObject>&& axObject, RefPtr<Inspector::Protocol::Array<int>>&& childNodeIds)
Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -225,7 +225,7 @@
RefPtr<IDBTransaction> idbTransaction = idbDatabase->transaction(scriptExecutionContext, objectStoreName, mode, ec);
if (ec.code)
return nullptr;
- return WTF::move(idbTransaction);
+ return idbTransaction;
}
static RefPtr<IDBObjectStore> objectStoreForTransaction(IDBTransaction* idbTransaction, const String& objectStoreName)
@@ -234,7 +234,7 @@
RefPtr<IDBObjectStore> idbObjectStore = idbTransaction->objectStore(objectStoreName, ec);
if (ec.code)
return nullptr;
- return WTF::move(idbObjectStore);
+ return idbObjectStore;
}
static RefPtr<IDBIndex> indexForObjectStore(IDBObjectStore* idbObjectStore, const String& indexName)
@@ -243,7 +243,7 @@
RefPtr<IDBIndex> idbIndex = idbObjectStore->index(indexName, ec);
if (ec.code)
return nullptr;
- return WTF::move(idbIndex);
+ return idbIndex;
}
static RefPtr<KeyPath> keyPathFromIDBKeyPath(const IDBKeyPath& idbKeyPath)
@@ -276,7 +276,7 @@
ASSERT_NOT_REACHED();
}
- return WTF::move(keyPath);
+ return keyPath;
}
class DatabaseLoader : public ExecutableWithDatabase {
Modified: trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -196,7 +196,7 @@
layerObject->setPseudoElement("first-line");
}
- return WTF::move(layerObject);
+ return layerObject;
}
int InspectorLayerTreeAgent::idForNode(ErrorString& errorString, Node* node)
Modified: trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -186,7 +186,7 @@
for (const auto& header : headers)
headersObject->setString(header.key, header.value);
- return WTF::move(headersObject);
+ return headersObject;
}
static Ref<Inspector::Protocol::Network::ResourceTiming> buildObjectForTiming(const ResourceLoadTiming& timing, DocumentLoader* loader)
@@ -212,7 +212,7 @@
.release();
if (request.httpBody() && !request.httpBody()->isEmpty())
requestObject->setPostData(request.httpBody()->flattenToString());
- return WTF::move(requestObject);
+ return requestObject;
}
static RefPtr<Inspector::Protocol::Network::Response> buildObjectForResourceResponse(const ResourceResponse& response, DocumentLoader* loader)
@@ -252,7 +252,7 @@
if (!sourceMappingURL.isEmpty())
resourceObject->setSourceMapURL(sourceMappingURL);
- return WTF::move(resourceObject);
+ return resourceObject;
}
InspectorNetworkAgent::~InspectorNetworkAgent()
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -372,7 +372,7 @@
array->addItem(buildObjectForPoint(quad.p2()));
array->addItem(buildObjectForPoint(quad.p3()));
array->addItem(buildObjectForPoint(quad.p4()));
- return WTF::move(array);
+ return array;
}
static Ref<Inspector::Protocol::OverlayTypes::FragmentHighlightData> buildObjectForHighlight(const Highlight& highlight)
@@ -450,7 +450,7 @@
arrayOfRegions->addItem(WTF::move(regionObject));
}
- return WTF::move(arrayOfRegions);
+ return arrayOfRegions;
}
static Ref<Inspector::Protocol::OverlayTypes::Size> buildObjectForSize(const IntSize& size)
@@ -834,7 +834,7 @@
}
}
- return WTF::move(highlights);
+ return highlights;
}
void InspectorOverlay::drawNodeHighlight()
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -130,7 +130,7 @@
decoder = TextResourceDecoder::create("text/html", "UTF-8");
else
decoder = TextResourceDecoder::create("text/plain", "UTF-8");
- return WTF::move(decoder);
+ return decoder;
}
bool InspectorPageAgent::cachedResourceContent(CachedResource* cachedResource, String* result, bool* base64Encoded)
@@ -443,7 +443,7 @@
for (const auto& cookie : cookiesList)
cookies->addItem(buildObjectForCookie(cookie));
- return WTF::move(cookies);
+ return cookies;
}
static Vector<CachedResource*> cachedResourcesForFrame(Frame* frame)
@@ -908,7 +908,7 @@
frameObject->setName(name);
}
- return WTF::move(frameObject);
+ return frameObject;
}
Ref<Inspector::Protocol::Page::FrameResourceTree> InspectorPageAgent::buildObjectForFrameTree(Frame* frame)
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -183,7 +183,7 @@
mediaObject->setSourceURL(sourceURL);
mediaObject->setSourceLine(media->queries()->lastLine());
}
- return WTF::move(mediaObject);
+ return mediaObject;
}
static RefPtr<CSSRuleList> asCSSRuleList(CSSStyleSheet* styleSheet)
@@ -327,7 +327,7 @@
result->addItem(WTF::move(entry));
}
- return WTF::move(result);
+ return result;
}
bool InspectorStyle::getText(String* result) const
@@ -875,7 +875,7 @@
}
}
- return WTF::move(inspectorSelector);
+ return inspectorSelector;
}
static Ref<Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSSelector>> selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetText, const CSSSelectorList& selectorList, Element* element)
@@ -899,7 +899,7 @@
selector = CSSSelectorList::next(selector);
}
- return WTF::move(result);
+ return result;
}
Ref<Inspector::Protocol::CSS::CSSSelector> InspectorStyleSheet::buildObjectForSelector(const CSSSelector* selector, Element* element)
@@ -931,7 +931,7 @@
.release();
if (sourceData)
result->setRange(buildSourceRangeObject(sourceData->ruleHeaderRange, lineEndings().get()));
- return WTF::move(result);
+ return result;
}
RefPtr<Inspector::Protocol::CSS::CSSRule> InspectorStyleSheet::buildObjectForRule(CSSStyleRule* rule, Element* element)
@@ -992,7 +992,7 @@
}
}
- return WTF::move(result);
+ return result;
}
bool InspectorStyleSheet::setStyleText(const InspectorCSSId& id, const String& text, String* oldText, ExceptionCode& ec)
@@ -1231,7 +1231,7 @@
{
auto result = Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSRule>::create();
if (!ruleList)
- return WTF::move(result);
+ return result;
RefPtr<CSSRuleList> refRuleList = ruleList;
CSSStyleRuleVector rules;
@@ -1240,7 +1240,7 @@
for (auto& rule : rules)
result->addItem(buildObjectForRule(rule.get(), nullptr));
- return WTF::move(result);
+ return result;
}
void InspectorStyleSheet::collectFlatRules(RefPtr<CSSRuleList>&& ruleList, CSSStyleRuleVector* result)
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -266,7 +266,7 @@
if (!m_enabledFromFrontend && m_pendingConsoleProfileRecords.isEmpty())
internalStop();
- return WTF::move(profile);
+ return profile;
}
}
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (194427 => 194428)
--- trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -55,7 +55,7 @@
if (stackTrace && stackTrace->size())
record->setValue(ASCIILiteral("stackTrace"), stackTrace->buildInspectorArray());
}
- return WTF::move(record);
+ return record;
}
Ref<InspectorObject> TimelineRecordFactory::createFunctionCallData(const String& scriptName, int scriptLine)
@@ -63,14 +63,14 @@
Ref<InspectorObject> data = ""
data->setString(ASCIILiteral("scriptName"), scriptName);
data->setInteger(ASCIILiteral("scriptLine"), scriptLine);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createConsoleProfileData(const String& title)
{
Ref<InspectorObject> data = ""
data->setString(ASCIILiteral("title"), title);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createProbeSampleData(const ScriptBreakpointAction& action, unsigned sampleId)
@@ -78,21 +78,21 @@
Ref<InspectorObject> data = ""
data->setInteger(ASCIILiteral("probeId"), action.identifier);
data->setInteger(ASCIILiteral("sampleId"), sampleId);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createEventDispatchData(const Event& event)
{
Ref<InspectorObject> data = ""
data->setString(ASCIILiteral("type"), event.type().string());
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createGenericTimerData(int timerId)
{
Ref<InspectorObject> data = ""
data->setInteger(ASCIILiteral("timerId"), timerId);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createTimerInstallData(int timerId, int timeout, bool singleShot)
@@ -101,7 +101,7 @@
data->setInteger(ASCIILiteral("timerId"), timerId);
data->setInteger(ASCIILiteral("timeout"), timeout);
data->setBoolean(ASCIILiteral("singleShot"), singleShot);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createEvaluateScriptData(const String& url, double lineNumber)
@@ -109,21 +109,21 @@
Ref<InspectorObject> data = ""
data->setString(ASCIILiteral("url"), url);
data->setInteger(ASCIILiteral("lineNumber"), lineNumber);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createTimeStampData(const String& message)
{
Ref<InspectorObject> data = ""
data->setString(ASCIILiteral("message"), message);
- return WTF::move(data);
+ return data;
}
Ref<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbackId)
{
Ref<InspectorObject> data = ""
data->setInteger(ASCIILiteral("id"), callbackId);
- return WTF::move(data);
+ return data;
}
static Ref<InspectorArray> createQuad(const FloatQuad& quad)
@@ -137,14 +137,14 @@
array->pushDouble(quad.p3().y());
array->pushDouble(quad.p4().x());
array->pushDouble(quad.p4().y());
- return WTF::move(array);
+ return array;
}
Ref<InspectorObject> TimelineRecordFactory::createPaintData(const FloatQuad& quad)
{
Ref<InspectorObject> data = ""
data->setArray(ASCIILiteral("clip"), createQuad(quad));
- return WTF::move(data);
+ return data;
}
void TimelineRecordFactory::appendLayoutRoot(InspectorObject* data, const FloatQuad& quad)
@@ -192,7 +192,7 @@
result->setChildren(WTF::move(children));
}
- return WTF::move(result);
+ return result;
}
static Ref<Protocol::Timeline::CPUProfile> buildProfileInspectorObject(const JSC::Profile* profile)
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (194427 => 194428)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -3523,7 +3523,7 @@
if (Page* page = frame->page())
page->chrome().focus();
}
- return WTF::move(frame);
+ return frame;
}
}
@@ -3615,7 +3615,7 @@
page->chrome().show();
created = true;
- return WTF::move(frame);
+ return frame;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/loader/NavigationAction.cpp (194427 => 194428)
--- trunk/Source/WebCore/loader/NavigationAction.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/loader/NavigationAction.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -106,7 +106,7 @@
{
NavigationAction result(*this);
result.m_shouldOpenExternalURLsPolicy = shouldOpenExternalURLsPolicy;
- return WTF::move(result);
+ return result;
}
}
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (194427 => 194428)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -2128,7 +2128,7 @@
newFrame->page()->setOpenedByDOM();
if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
- return WTF::move(newFrame);
+ return newFrame;
if (prepareDialogFunction)
prepareDialogFunction(*newFrame->document()->domWindow());
@@ -2146,7 +2146,7 @@
if (!newFrame->page())
return nullptr;
- return WTF::move(newFrame);
+ return newFrame;
}
PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString,
Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.mm (194427 => 194428)
--- trunk/Source/WebCore/platform/network/ios/QuickLook.mm 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.mm 2015-12-28 16:26:24 UTC (rev 194428)
@@ -403,7 +403,7 @@
std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], connection, nsResponse, delegate));
handle->client()->didCreateQuickLookHandle(*quickLookHandle);
- return WTF::move(quickLookHandle);
+ return quickLookHandle;
}
#if USE(CFNETWORK)
@@ -417,7 +417,7 @@
WebQuickLookHandleAsDelegate *delegate = [[[WebQuickLookHandleAsDelegate alloc] initWithConnectionDelegate:connectionDelegate] autorelease];
std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, nsResponse, delegate));
handle->client()->didCreateQuickLookHandle(*quickLookHandle);
- return WTF::move(quickLookHandle);
+ return quickLookHandle;
}
CFURLResponseRef QuickLookHandle::cfResponse()
@@ -439,7 +439,7 @@
std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([loader.originalRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, response.nsURLResponse(), delegate.get()));
[delegate setQuickLookHandle:quickLookHandle.get()];
loader.didCreateQuickLookHandle(*quickLookHandle);
- return WTF::move(quickLookHandle);
+ return quickLookHandle;
}
NSURLResponse *QuickLookHandle::nsResponse()
Modified: trunk/Source/WebCore/testing/Internals.cpp (194427 => 194428)
--- trunk/Source/WebCore/testing/Internals.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/testing/Internals.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1801,7 +1801,7 @@
RefPtr<DOMWindow> frontendWindow = window->open(url, "", "", *window, *window);
m_inspectorFrontend = std::make_unique<InspectorStubFrontend>(inspectedPage, frontendWindow.copyRef());
- return WTF::move(frontendWindow);
+ return frontendWindow;
}
void Internals::closeDummyInspectorFrontend()
Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.cpp (194427 => 194428)
--- trunk/Source/WebCore/workers/WorkerScriptLoader.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -101,7 +101,7 @@
{
auto request = std::make_unique<ResourceRequest>(m_url);
request->setHTTPMethod("GET");
- return WTF::move(request);
+ return request;
}
void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
Modified: trunk/Source/WebCore/xml/XPathExpression.cpp (194427 => 194428)
--- trunk/Source/WebCore/xml/XPathExpression.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebCore/xml/XPathExpression.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -87,7 +87,7 @@
return nullptr;
}
- return WTF::move(result);
+ return result;
}
}
Modified: trunk/Source/WebKit2/ChangeLog (194427 => 194428)
--- trunk/Source/WebKit2/ChangeLog 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebKit2/ChangeLog 2015-12-28 16:26:24 UTC (rev 194428)
@@ -1,3 +1,18 @@
+2015-12-25 Andy Estes <[email protected]>
+
+ Stop moving local objects in return statements
+ https://bugs.webkit.org/show_bug.cgi?id=152557
+
+ Reviewed by Brady Eidson.
+
+ Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
+
+ Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
+ I found these issues by temporarily replacing WTF::move with std::move and recompiling.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::ExceededDatabaseQuotaRecords::createRecord):
+
2015-12-26 Joonghun Park <[email protected]>
[WK2][EFL] Use eina_file_path_join at platformDefaultIconDatabasePath in WebProcessPoolEfl
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (194427 => 194428)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-28 03:01:04 UTC (rev 194427)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-28 16:26:24 UTC (rev 194428)
@@ -239,7 +239,7 @@
record->currentDatabaseUsage = currentDatabaseUsage;
record->expectedUsage = expectedUsage;
record->reply = reply;
- return WTF::move(record);
+ return record;
}
void ExceededDatabaseQuotaRecords::add(std::unique_ptr<ExceededDatabaseQuotaRecords::Record> record)