Changeset 194428 in webkit
- Timestamp:
- Dec 28, 2015, 8:26:24 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 41 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/inspector/ScriptCallStack.cpp (modified) (1 diff)
-
JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp (modified) (1 diff)
-
JavaScriptCore/jit/CallFrameShuffler.h (modified) (1 diff)
-
JavaScriptCore/runtime/TypeSet.cpp (modified) (2 diffs)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/StdLibExtras.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp (modified) (1 diff)
-
WebCore/Modules/indexeddb/IDBKeyData.cpp (modified) (1 diff)
-
WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (modified) (2 diffs)
-
WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (modified) (7 diffs)
-
WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (modified) (2 diffs)
-
WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (modified) (2 diffs)
-
WebCore/Modules/indexeddb/shared/IDBResultData.cpp (modified) (3 diffs)
-
WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp (modified) (2 diffs)
-
WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (modified) (1 diff)
-
WebCore/Modules/webaudio/OfflineAudioContext.cpp (modified) (1 diff)
-
WebCore/Modules/webdatabase/DatabaseTracker.cpp (modified) (1 diff)
-
WebCore/Modules/websockets/WebSocket.cpp (modified) (1 diff)
-
WebCore/css/CSSPrimitiveValue.cpp (modified) (1 diff)
-
WebCore/dom/NodeOrString.cpp (modified) (1 diff)
-
WebCore/inspector/InspectorApplicationCacheAgent.cpp (modified) (1 diff)
-
WebCore/inspector/InspectorDOMAgent.cpp (modified) (6 diffs)
-
WebCore/inspector/InspectorIndexedDBAgent.cpp (modified) (4 diffs)
-
WebCore/inspector/InspectorLayerTreeAgent.cpp (modified) (1 diff)
-
WebCore/inspector/InspectorNetworkAgent.cpp (modified) (3 diffs)
-
WebCore/inspector/InspectorOverlay.cpp (modified) (3 diffs)
-
WebCore/inspector/InspectorPageAgent.cpp (modified) (3 diffs)
-
WebCore/inspector/InspectorStyleSheet.cpp (modified) (8 diffs)
-
WebCore/inspector/InspectorTimelineAgent.cpp (modified) (1 diff)
-
WebCore/inspector/TimelineRecordFactory.cpp (modified) (13 diffs)
-
WebCore/loader/FrameLoader.cpp (modified) (2 diffs)
-
WebCore/loader/NavigationAction.cpp (modified) (1 diff)
-
WebCore/page/DOMWindow.cpp (modified) (2 diffs)
-
WebCore/platform/network/ios/QuickLook.mm (modified) (3 diffs)
-
WebCore/testing/Internals.cpp (modified) (1 diff)
-
WebCore/workers/WorkerScriptLoader.cpp (modified) (1 diff)
-
WebCore/xml/XPathExpression.cpp (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/WebPageProxy.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r194423 r194428 1 2015-12-25 Andy Estes <aestes@apple.com> 2 3 Stop moving local objects in return statements 4 https://bugs.webkit.org/show_bug.cgi?id=152557 5 6 Reviewed by Brady Eidson. 7 8 Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization. 9 10 Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly. 11 I found these issues by temporarily replacing WTF::move with std::move and recompiling. 12 13 * inspector/ScriptCallStack.cpp: 14 (Inspector::ScriptCallStack::buildInspectorArray): 15 * inspector/agents/InspectorScriptProfilerAgent.cpp: 16 (Inspector::buildInspectorObject): 17 * jit/CallFrameShuffler.h: 18 (JSC::CallFrameShuffler::snapshot): 19 * runtime/TypeSet.cpp: 20 (JSC::TypeSet::allStructureRepresentations): 21 (JSC::StructureShape::inspectorRepresentation): 22 1 23 2015-12-26 Mark Lam <mark.lam@apple.com> 2 24 -
trunk/Source/JavaScriptCore/inspector/ScriptCallStack.cpp
r178820 r194428 112 112 for (size_t i = 0; i < m_frames.size(); i++) 113 113 frames->addItem(m_frames.at(i).buildInspectorObject()); 114 return WTF::move(frames);114 return frames; 115 115 } 116 116 -
trunk/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp
r194242 r194428 182 182 } 183 183 184 return WTF::move(result);184 return result; 185 185 } 186 186 -
trunk/Source/JavaScriptCore/jit/CallFrameShuffler.h
r190370 r194428 118 118 #endif 119 119 } 120 return WTF::move(data);120 return data; 121 121 } 122 122 -
trunk/Source/JavaScriptCore/runtime/TypeSet.cpp
r184828 r194428 225 225 description->addItem(m_structureHistory.at(i)->inspectorRepresentation()); 226 226 227 return WTF::move(description);227 return description; 228 228 } 229 229 … … 524 524 } 525 525 526 return WTF::move(base);526 return base; 527 527 } 528 528 -
trunk/Source/WTF/ChangeLog
r194382 r194428 1 2015-12-25 Andy Estes <aestes@apple.com> 2 3 Stop moving local objects in return statements 4 https://bugs.webkit.org/show_bug.cgi?id=152557 5 6 Reviewed by Brady Eidson. 7 8 * wtf/StdLibExtras.h: Added a FIXME about how using WTF::move() prevents several Clang diagnostics from emitting useful warnings. 9 1 10 2015-12-22 Filip Pizlo <fpizlo@apple.com> 2 11 -
trunk/Source/WTF/wtf/StdLibExtras.h
r190090 r194428 112 112 namespace WTF { 113 113 114 // FIXME: Using this function prevents Clang's move diagnostics (-Wpessimizing-move, -Wredundant-move, -Wself-move) from 115 // finding mistakes, since these diagnostics only evaluate calls to std::move(). 114 116 template<typename T> 115 117 ALWAYS_INLINE typename std::remove_reference<T>::type&& move(T&& value) -
trunk/Source/WebCore/ChangeLog
r194426 r194428 1 2015-12-25 Andy Estes <aestes@apple.com> 2 3 Stop moving local objects in return statements 4 https://bugs.webkit.org/show_bug.cgi?id=152557 5 6 Reviewed by Brady Eidson. 7 8 Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization. 9 10 Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly. 11 I found these issues by temporarily replacing WTF::move with std::move and recompiling. 12 13 * Modules/indexeddb/IDBDatabaseIdentifier.cpp: 14 (WebCore::IDBDatabaseIdentifier::isolatedCopy): 15 * Modules/indexeddb/IDBKeyData.cpp: 16 (WebCore::IDBKeyData::deletedValue): 17 * Modules/indexeddb/client/IDBDatabaseImpl.cpp: 18 (WebCore::IDBClient::IDBDatabase::objectStoreNames): 19 (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction): 20 * Modules/indexeddb/client/IDBTransactionImpl.cpp: 21 (WebCore::IDBClient::IDBTransaction::createObjectStore): 22 (WebCore::IDBClient::IDBTransaction::createIndex): 23 (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor): 24 (WebCore::IDBClient::IDBTransaction::requestGetRecord): 25 (WebCore::IDBClient::IDBTransaction::requestIndexRecord): 26 (WebCore::IDBClient::IDBTransaction::requestClearObjectStore): 27 (WebCore::IDBClient::IDBTransaction::requestPutOrAdd): 28 * Modules/indexeddb/server/UniqueIDBDatabase.cpp: 29 (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction): 30 * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: 31 (WebCore::IDBDatabaseInfo::isolatedCopy): 32 (WebCore::IDBDatabaseInfo::objectStoreNames): 33 * Modules/indexeddb/shared/IDBResultData.cpp: 34 (WebCore::IDBResultData::error): 35 (WebCore::IDBResultData::openDatabaseSuccess): 36 (WebCore::IDBResultData::openDatabaseUpgradeNeeded): 37 * Modules/indexeddb/shared/IDBTransactionInfo.cpp: 38 (WebCore::IDBTransactionInfo::versionChange): 39 (WebCore::IDBTransactionInfo::isolatedCopy): 40 * Modules/indexeddb/shared/InProcessIDBServer.cpp: 41 (WebCore::InProcessIDBServer::create): 42 * Modules/webaudio/OfflineAudioContext.cpp: 43 (WebCore::OfflineAudioContext::create): 44 * Modules/webdatabase/DatabaseTracker.cpp: 45 (WebCore::DatabaseTracker::originLockFor): 46 * Modules/websockets/WebSocket.cpp: 47 (WebCore::WebSocket::create): 48 * css/CSSPrimitiveValue.cpp: 49 (WebCore::CSSPrimitiveValue::formatNumberValue): 50 * dom/NodeOrString.cpp: 51 (WebCore::convertNodesOrStringsIntoNode): 52 * inspector/InspectorApplicationCacheAgent.cpp: 53 (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): 54 * inspector/InspectorDOMAgent.cpp: 55 (WebCore::InspectorDOMAgent::buildObjectForNode): 56 (WebCore::InspectorDOMAgent::buildArrayForElementAttributes): 57 (WebCore::InspectorDOMAgent::buildArrayForContainerChildren): 58 (WebCore::InspectorDOMAgent::buildObjectForEventListener): 59 * inspector/InspectorIndexedDBAgent.cpp: 60 * inspector/InspectorLayerTreeAgent.cpp: 61 (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): 62 * inspector/InspectorNetworkAgent.cpp: 63 (WebCore::buildObjectForHeaders): 64 (WebCore::buildObjectForResourceRequest): 65 (WebCore::buildObjectForCachedResource): 66 * inspector/InspectorOverlay.cpp: 67 (WebCore::buildArrayForQuad): 68 (WebCore::buildObjectForFlowRegions): 69 (WebCore::InspectorOverlay::buildObjectForHighlightedNodes): 70 * inspector/InspectorPageAgent.cpp: 71 (WebCore::createXHRTextDecoder): 72 (WebCore::buildArrayForCookies): 73 (WebCore::InspectorPageAgent::buildObjectForFrame): 74 * inspector/InspectorStyleSheet.cpp: 75 (WebCore::buildMediaObject): 76 (WebCore::InspectorStyle::buildArrayForComputedStyle): 77 (WebCore::buildObjectForSelectorHelper): 78 (WebCore::selectorsFromSource): 79 (WebCore::InspectorStyleSheet::buildObjectForSelectorList): 80 (WebCore::InspectorStyleSheet::buildObjectForStyle): 81 (WebCore::InspectorStyleSheet::buildArrayForRuleList): 82 * inspector/InspectorTimelineAgent.cpp: 83 (WebCore::InspectorTimelineAgent::stopFromConsole): 84 * inspector/TimelineRecordFactory.cpp: 85 (WebCore::TimelineRecordFactory::createGenericRecord): 86 (WebCore::TimelineRecordFactory::createFunctionCallData): 87 (WebCore::TimelineRecordFactory::createConsoleProfileData): 88 (WebCore::TimelineRecordFactory::createProbeSampleData): 89 (WebCore::TimelineRecordFactory::createEventDispatchData): 90 (WebCore::TimelineRecordFactory::createGenericTimerData): 91 (WebCore::TimelineRecordFactory::createTimerInstallData): 92 (WebCore::TimelineRecordFactory::createEvaluateScriptData): 93 (WebCore::TimelineRecordFactory::createTimeStampData): 94 (WebCore::TimelineRecordFactory::createAnimationFrameData): 95 (WebCore::createQuad): 96 (WebCore::TimelineRecordFactory::createPaintData): 97 (WebCore::buildInspectorObject): 98 * loader/FrameLoader.cpp: 99 (WebCore::createWindow): 100 * loader/NavigationAction.cpp: 101 (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy): 102 * page/DOMWindow.cpp: 103 (WebCore::DOMWindow::createWindow): 104 * platform/network/ios/QuickLook.mm: 105 (WebCore::QuickLookHandle::create): 106 * testing/Internals.cpp: 107 (WebCore::Internals::openDummyInspectorFrontend): 108 * workers/WorkerScriptLoader.cpp: 109 (WebCore::WorkerScriptLoader::createResourceRequest): 110 * xml/XPathExpression.cpp: 111 (WebCore::XPathExpression::evaluate): 112 1 113 2015-12-27 Zalan Bujtas <zalan@apple.com> 2 114 -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp
r190379 r194428 53 53 identifier.m_mainFrameOrigin = m_mainFrameOrigin.isolatedCopy(); 54 54 55 return WTF::move(identifier);55 return identifier; 56 56 } 57 57 -
trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp
r191635 r194428 325 325 result.m_isNull = false; 326 326 result.m_isDeletedValue = true; 327 return WTF::move(result);327 return result; 328 328 } 329 329 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp
r194413 r194428 85 85 objectStoreNames->append(name); 86 86 objectStoreNames->sort(); 87 return WTF::move(objectStoreNames);87 return objectStoreNames; 88 88 } 89 89 … … 267 267 m_activeTransactions.set(transaction->info().identifier(), &transaction.get()); 268 268 269 return WTF::move(transaction);269 return transaction; 270 270 } 271 271 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp
r193970 r194428 445 445 scheduleOperation(WTF::move(operation)); 446 446 447 return WTF::move(objectStore);447 return objectStore; 448 448 } 449 449 … … 474 474 scheduleOperation(WTF::move(operation)); 475 475 476 return WTF::move(index);476 return index; 477 477 } 478 478 … … 530 530 scheduleOperation(WTF::move(operation)); 531 531 532 return WTF::move(request);532 return request; 533 533 } 534 534 … … 585 585 scheduleOperation(WTF::move(operation)); 586 586 587 return WTF::move(request);587 return request; 588 588 } 589 589 … … 612 612 scheduleOperation(WTF::move(operation)); 613 613 614 return WTF::move(request);614 return request; 615 615 } 616 616 … … 733 733 scheduleOperation(WTF::move(operation)); 734 734 735 return WTF::move(request);735 return request; 736 736 } 737 737 … … 764 764 scheduleOperation(WTF::move(operation)); 765 765 766 return WTF::move(request);766 return request; 767 767 } 768 768 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
r194414 r194428 1086 1086 hadDeferredTransactions = !deferredTransactions.isEmpty(); 1087 1087 if (!hadDeferredTransactions) 1088 return WTF::move(currentTransaction);1088 return currentTransaction; 1089 1089 1090 1090 // Prepend the deferred transactions back on the beginning of the deque for future scheduling passes. … … 1092 1092 m_pendingTransactions.prepend(deferredTransactions.takeLast()); 1093 1093 1094 return WTF::move(currentTransaction);1094 return currentTransaction; 1095 1095 } 1096 1096 -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp
r192645 r194428 48 48 info.m_version = m_version; 49 49 50 return WTF::move(info);50 return info; 51 51 } 52 52 … … 124 124 names.uncheckedAppend(objectStore.name()); 125 125 126 return WTF::move(names);126 return names; 127 127 } 128 128 -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp
r192687 r194428 68 68 result.m_type = IDBResultType::Error; 69 69 result.m_error = error; 70 return WTF::move(result);70 return result; 71 71 } 72 72 … … 77 77 result.m_databaseConnectionIdentifier = connection.identifier(); 78 78 result.m_databaseInfo = std::make_unique<IDBDatabaseInfo>(connection.database().info()); 79 return WTF::move(result);79 return result; 80 80 } 81 81 … … 88 88 result.m_databaseInfo = std::make_unique<IDBDatabaseInfo>(transaction.databaseConnection().database().info()); 89 89 result.m_transactionInfo = std::make_unique<IDBTransactionInfo>(transaction.info()); 90 return WTF::move(result);90 return result; 91 91 } 92 92 -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp
r194414 r194428 54 54 result.m_originalDatabaseInfo = std::make_unique<IDBDatabaseInfo>(originalDatabaseInfo); 55 55 56 return WTF::move(result);56 return result; 57 57 } 58 58 … … 80 80 result.m_originalDatabaseInfo = std::make_unique<IDBDatabaseInfo>(*m_originalDatabaseInfo); 81 81 82 return WTF::move(result);82 return result; 83 83 } 84 84 -
trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp
r194414 r194428 45 45 Ref<InProcessIDBServer> server = adoptRef(*new InProcessIDBServer); 46 46 server->m_server->registerConnection(server->connectionToClient()); 47 return WTF::move(server);47 return server; 48 48 } 49 49 -
trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp
r184709 r194428 52 52 RefPtr<OfflineAudioContext> audioContext(adoptRef(new OfflineAudioContext(document, numberOfChannels, numberOfFrames, sampleRate))); 53 53 audioContext->suspendIfNeeded(); 54 return WTF::move(audioContext);54 return audioContext; 55 55 } 56 56 -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
r188772 r194428 668 668 addResult.iterator->value = lock; 669 669 670 return WTF::move(lock);670 return lock; 671 671 } 672 672 -
trunk/Source/WebCore/Modules/websockets/WebSocket.cpp
r192848 r194428 184 184 return nullptr; 185 185 186 return WTF::move(webSocket);186 return webSocket; 187 187 } 188 188 -
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r191128 r194428 977 977 buffer[length + i] = static_cast<LChar>(suffix[i]); 978 978 979 return WTF::move(string);979 return string; 980 980 } 981 981 -
trunk/Source/WebCore/dom/NodeOrString.cpp
r186803 r194428 62 62 } 63 63 64 return WTF::move(nodeToReturn);64 return nodeToReturn; 65 65 } 66 66 -
trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
r189438 r194428 165 165 resources->addItem(buildObjectForApplicationCacheResource(resourceInfo)); 166 166 167 return WTF::move(resources);167 return resources; 168 168 } 169 169 -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r190271 r194428 1377 1377 } 1378 1378 1379 return WTF::move(value);1379 return value; 1380 1380 } 1381 1381 … … 1385 1385 // Go through all attributes and serialize them. 1386 1386 if (!element->hasAttributes()) 1387 return WTF::move(attributesValue);1387 return attributesValue; 1388 1388 for (const Attribute& attribute : element->attributesIterator()) { 1389 1389 // Add attribute pair … … 1391 1391 attributesValue->addItem(attribute.value()); 1392 1392 } 1393 return WTF::move(attributesValue);1393 return attributesValue; 1394 1394 } 1395 1395 … … 1404 1404 m_childrenRequested.add(bind(container, nodesMap)); 1405 1405 } 1406 return WTF::move(children);1406 return children; 1407 1407 } 1408 1408 … … 1415 1415 child = innerNextSibling(child); 1416 1416 } 1417 return WTF::move(children);1417 return children; 1418 1418 } 1419 1419 … … 1482 1482 value->setSourceName(sourceName); 1483 1483 } 1484 return WTF::move(value);1484 return value; 1485 1485 } 1486 1486 -
trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
r193428 r194428 226 226 if (ec.code) 227 227 return nullptr; 228 return WTF::move(idbTransaction);228 return idbTransaction; 229 229 } 230 230 … … 235 235 if (ec.code) 236 236 return nullptr; 237 return WTF::move(idbObjectStore);237 return idbObjectStore; 238 238 } 239 239 … … 244 244 if (ec.code) 245 245 return nullptr; 246 return WTF::move(idbIndex);246 return idbIndex; 247 247 } 248 248 … … 277 277 } 278 278 279 return WTF::move(keyPath);279 return keyPath; 280 280 } 281 281 -
trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
r189438 r194428 197 197 } 198 198 199 return WTF::move(layerObject);199 return layerObject; 200 200 } 201 201 -
trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp
r192061 r194428 187 187 for (const auto& header : headers) 188 188 headersObject->setString(header.key, header.value); 189 return WTF::move(headersObject);189 return headersObject; 190 190 } 191 191 … … 213 213 if (request.httpBody() && !request.httpBody()->isEmpty()) 214 214 requestObject->setPostData(request.httpBody()->flattenToString()); 215 return WTF::move(requestObject);215 return requestObject; 216 216 } 217 217 … … 253 253 resourceObject->setSourceMapURL(sourceMappingURL); 254 254 255 return WTF::move(resourceObject);255 return resourceObject; 256 256 } 257 257 -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r190271 r194428 373 373 array->addItem(buildObjectForPoint(quad.p3())); 374 374 array->addItem(buildObjectForPoint(quad.p4())); 375 return WTF::move(array);375 return array; 376 376 } 377 377 … … 451 451 } 452 452 453 return WTF::move(arrayOfRegions);453 return arrayOfRegions; 454 454 } 455 455 … … 835 835 } 836 836 837 return WTF::move(highlights);837 return highlights; 838 838 } 839 839 -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r194017 r194428 131 131 else 132 132 decoder = TextResourceDecoder::create("text/plain", "UTF-8"); 133 return WTF::move(decoder);133 return decoder; 134 134 } 135 135 … … 444 444 cookies->addItem(buildObjectForCookie(cookie)); 445 445 446 return WTF::move(cookies);446 return cookies; 447 447 } 448 448 … … 909 909 } 910 910 911 return WTF::move(frameObject);911 return frameObject; 912 912 } 913 913 -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r190271 r194428 184 184 mediaObject->setSourceLine(media->queries()->lastLine()); 185 185 } 186 return WTF::move(mediaObject);186 return mediaObject; 187 187 } 188 188 … … 328 328 } 329 329 330 return WTF::move(result);330 return result; 331 331 } 332 332 … … 876 876 } 877 877 878 return WTF::move(inspectorSelector);878 return inspectorSelector; 879 879 } 880 880 … … 900 900 selector = CSSSelectorList::next(selector); 901 901 } 902 return WTF::move(result);902 return result; 903 903 } 904 904 … … 932 932 if (sourceData) 933 933 result->setRange(buildSourceRangeObject(sourceData->ruleHeaderRange, lineEndings().get())); 934 return WTF::move(result);934 return result; 935 935 } 936 936 … … 993 993 } 994 994 995 return WTF::move(result);995 return result; 996 996 } 997 997 … … 1232 1232 auto result = Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSRule>::create(); 1233 1233 if (!ruleList) 1234 return WTF::move(result);1234 return result; 1235 1235 1236 1236 RefPtr<CSSRuleList> refRuleList = ruleList; … … 1241 1241 result->addItem(buildObjectForRule(rule.get(), nullptr)); 1242 1242 1243 return WTF::move(result);1243 return result; 1244 1244 } 1245 1245 -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r193426 r194428 267 267 internalStop(); 268 268 269 return WTF::move(profile);269 return profile; 270 270 } 271 271 } -
trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp
r191967 r194428 56 56 record->setValue(ASCIILiteral("stackTrace"), stackTrace->buildInspectorArray()); 57 57 } 58 return WTF::move(record);58 return record; 59 59 } 60 60 … … 64 64 data->setString(ASCIILiteral("scriptName"), scriptName); 65 65 data->setInteger(ASCIILiteral("scriptLine"), scriptLine); 66 return WTF::move(data);66 return data; 67 67 } 68 68 … … 71 71 Ref<InspectorObject> data = InspectorObject::create(); 72 72 data->setString(ASCIILiteral("title"), title); 73 return WTF::move(data);73 return data; 74 74 } 75 75 … … 79 79 data->setInteger(ASCIILiteral("probeId"), action.identifier); 80 80 data->setInteger(ASCIILiteral("sampleId"), sampleId); 81 return WTF::move(data);81 return data; 82 82 } 83 83 … … 86 86 Ref<InspectorObject> data = InspectorObject::create(); 87 87 data->setString(ASCIILiteral("type"), event.type().string()); 88 return WTF::move(data);88 return data; 89 89 } 90 90 … … 93 93 Ref<InspectorObject> data = InspectorObject::create(); 94 94 data->setInteger(ASCIILiteral("timerId"), timerId); 95 return WTF::move(data);95 return data; 96 96 } 97 97 … … 102 102 data->setInteger(ASCIILiteral("timeout"), timeout); 103 103 data->setBoolean(ASCIILiteral("singleShot"), singleShot); 104 return WTF::move(data);104 return data; 105 105 } 106 106 … … 110 110 data->setString(ASCIILiteral("url"), url); 111 111 data->setInteger(ASCIILiteral("lineNumber"), lineNumber); 112 return WTF::move(data);112 return data; 113 113 } 114 114 … … 117 117 Ref<InspectorObject> data = InspectorObject::create(); 118 118 data->setString(ASCIILiteral("message"), message); 119 return WTF::move(data);119 return data; 120 120 } 121 121 … … 124 124 Ref<InspectorObject> data = InspectorObject::create(); 125 125 data->setInteger(ASCIILiteral("id"), callbackId); 126 return WTF::move(data);126 return data; 127 127 } 128 128 … … 138 138 array->pushDouble(quad.p4().x()); 139 139 array->pushDouble(quad.p4().y()); 140 return WTF::move(array);140 return array; 141 141 } 142 142 … … 145 145 Ref<InspectorObject> data = InspectorObject::create(); 146 146 data->setArray(ASCIILiteral("clip"), createQuad(quad)); 147 return WTF::move(data);147 return data; 148 148 } 149 149 … … 193 193 } 194 194 195 return WTF::move(result);195 return result; 196 196 } 197 197 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r194419 r194428 3524 3524 page->chrome().focus(); 3525 3525 } 3526 return WTF::move(frame);3526 return frame; 3527 3527 } 3528 3528 } … … 3616 3616 3617 3617 created = true; 3618 return WTF::move(frame);3618 return frame; 3619 3619 } 3620 3620 -
trunk/Source/WebCore/loader/NavigationAction.cpp
r185111 r194428 107 107 NavigationAction result(*this); 108 108 result.m_shouldOpenExternalURLsPolicy = shouldOpenExternalURLsPolicy; 109 return WTF::move(result);109 return result; 110 110 } 111 111 -
trunk/Source/WebCore/page/DOMWindow.cpp
r192848 r194428 2129 2129 2130 2130 if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) 2131 return WTF::move(newFrame);2131 return newFrame; 2132 2132 2133 2133 if (prepareDialogFunction) … … 2147 2147 return nullptr; 2148 2148 2149 return WTF::move(newFrame);2149 return newFrame; 2150 2150 } 2151 2151 -
trunk/Source/WebCore/platform/network/ios/QuickLook.mm
r194378 r194428 404 404 std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], connection, nsResponse, delegate)); 405 405 handle->client()->didCreateQuickLookHandle(*quickLookHandle); 406 return WTF::move(quickLookHandle);406 return quickLookHandle; 407 407 } 408 408 … … 418 418 std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, nsResponse, delegate)); 419 419 handle->client()->didCreateQuickLookHandle(*quickLookHandle); 420 return WTF::move(quickLookHandle);420 return quickLookHandle; 421 421 } 422 422 … … 440 440 [delegate setQuickLookHandle:quickLookHandle.get()]; 441 441 loader.didCreateQuickLookHandle(*quickLookHandle); 442 return WTF::move(quickLookHandle);442 return quickLookHandle; 443 443 } 444 444 -
trunk/Source/WebCore/testing/Internals.cpp
r194322 r194428 1802 1802 m_inspectorFrontend = std::make_unique<InspectorStubFrontend>(inspectedPage, frontendWindow.copyRef()); 1803 1803 1804 return WTF::move(frontendWindow);1804 return frontendWindow; 1805 1805 } 1806 1806 -
trunk/Source/WebCore/workers/WorkerScriptLoader.cpp
r174125 r194428 102 102 auto request = std::make_unique<ResourceRequest>(m_url); 103 103 request->setHTTPMethod("GET"); 104 return WTF::move(request);104 return request; 105 105 } 106 106 -
trunk/Source/WebCore/xml/XPathExpression.cpp
r184709 r194428 88 88 } 89 89 90 return WTF::move(result);90 return result; 91 91 } 92 92 -
trunk/Source/WebKit2/ChangeLog
r194425 r194428 1 2015-12-25 Andy Estes <aestes@apple.com> 2 3 Stop moving local objects in return statements 4 https://bugs.webkit.org/show_bug.cgi?id=152557 5 6 Reviewed by Brady Eidson. 7 8 Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization. 9 10 Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly. 11 I found these issues by temporarily replacing WTF::move with std::move and recompiling. 12 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::ExceededDatabaseQuotaRecords::createRecord): 15 1 16 2015-12-26 Joonghun Park <jh718.park@samsung.com> 2 17 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r194264 r194428 240 240 record->expectedUsage = expectedUsage; 241 241 record->reply = reply; 242 return WTF::move(record);242 return record; 243 243 } 244 244
Note:
See TracChangeset
for help on using the changeset viewer.