Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (203302 => 203303)
--- trunk/Source/_javascript_Core/ChangeLog 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-07-15 21:51:07 UTC (rev 203303)
@@ -1,3 +1,15 @@
+2016-07-15 Geoffrey Garen <[email protected]>
+
+ Added a makeRef<T> helper
+ https://bugs.webkit.org/show_bug.cgi?id=159835
+
+ Reviewed by Andreas Kling.
+
+ Anders told me to!
+
+ * inspector/InjectedScriptHost.cpp:
+ (Inspector::InjectedScriptHost::wrapper):
+
2016-07-15 Mark Lam <[email protected]>
FunctionOverride's parseClause() needs to keep the CString instance in scope while its data is being used.
Modified: trunk/Source/_javascript_Core/inspector/InjectedScriptHost.cpp (203302 => 203303)
--- trunk/Source/_javascript_Core/inspector/InjectedScriptHost.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/_javascript_Core/inspector/InjectedScriptHost.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -45,7 +45,7 @@
JSObject* prototype = JSInjectedScriptHost::createPrototype(exec->vm(), globalObject);
Structure* structure = JSInjectedScriptHost::createStructure(exec->vm(), globalObject, prototype);
- JSInjectedScriptHost* injectedScriptHost = JSInjectedScriptHost::create(exec->vm(), structure, Ref<InjectedScriptHost>(*this));
+ JSInjectedScriptHost* injectedScriptHost = JSInjectedScriptHost::create(exec->vm(), structure, makeRef(*this));
m_wrappers.addWrapper(globalObject, injectedScriptHost);
return injectedScriptHost;
Modified: trunk/Source/WTF/ChangeLog (203302 => 203303)
--- trunk/Source/WTF/ChangeLog 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WTF/ChangeLog 2016-07-15 21:51:07 UTC (rev 203303)
@@ -1,3 +1,15 @@
+2016-07-15 Geoffrey Garen <[email protected]>
+
+ Added a makeRef<T> helper
+ https://bugs.webkit.org/show_bug.cgi?id=159835
+
+ Reviewed by Andreas Kling.
+
+ Anders told me to!
+
+ * wtf/Ref.h:
+ (WTF::makeRef): Helper function to do type inference for you.
+
2016-07-15 Ryan Haddad <[email protected]>
Unreviewed, rolling out r203266.
Modified: trunk/Source/WTF/wtf/Ref.h (203302 => 203303)
--- trunk/Source/WTF/wtf/Ref.h 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WTF/wtf/Ref.h 2016-07-15 21:51:07 UTC (rev 203303)
@@ -217,6 +217,12 @@
return Ref<T>(reference, Ref<T>::Adopt);
}
+template<typename T>
+inline Ref<T> makeRef(T& reference)
+{
+ return Ref<T>(reference);
+}
+
template<typename ExpectedType, typename ArgType> inline bool is(Ref<ArgType>& source)
{
return is<ExpectedType>(source.get());
@@ -231,6 +237,7 @@
using WTF::Ref;
using WTF::adoptRef;
+using WTF::makeRef;
using WTF::static_reference_cast;
#endif // WTF_Ref_h
Modified: trunk/Source/WebCore/ChangeLog (203302 => 203303)
--- trunk/Source/WebCore/ChangeLog 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/ChangeLog 2016-07-15 21:51:07 UTC (rev 203303)
@@ -1,3 +1,106 @@
+2016-07-15 Geoffrey Garen <[email protected]>
+
+ Added a makeRef<T> helper
+ https://bugs.webkit.org/show_bug.cgi?id=159835
+
+ Reviewed by Andreas Kling.
+
+ Anders told me to!
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::putOrAddOnServer):
+ * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+ (WebCore::InProcessIDBServer::deleteDatabase):
+ (WebCore::InProcessIDBServer::didDeleteDatabase):
+ (WebCore::InProcessIDBServer::openDatabase):
+ (WebCore::InProcessIDBServer::didOpenDatabase):
+ (WebCore::InProcessIDBServer::didAbortTransaction):
+ (WebCore::InProcessIDBServer::didCommitTransaction):
+ (WebCore::InProcessIDBServer::didCreateObjectStore):
+ (WebCore::InProcessIDBServer::didDeleteObjectStore):
+ (WebCore::InProcessIDBServer::didClearObjectStore):
+ (WebCore::InProcessIDBServer::didCreateIndex):
+ (WebCore::InProcessIDBServer::didDeleteIndex):
+ (WebCore::InProcessIDBServer::didPutOrAdd):
+ (WebCore::InProcessIDBServer::didGetRecord):
+ (WebCore::InProcessIDBServer::didGetCount):
+ (WebCore::InProcessIDBServer::didDeleteRecord):
+ (WebCore::InProcessIDBServer::didOpenCursor):
+ (WebCore::InProcessIDBServer::didIterateCursor):
+ (WebCore::InProcessIDBServer::abortTransaction):
+ (WebCore::InProcessIDBServer::commitTransaction):
+ (WebCore::InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
+ (WebCore::InProcessIDBServer::createObjectStore):
+ (WebCore::InProcessIDBServer::deleteObjectStore):
+ (WebCore::InProcessIDBServer::clearObjectStore):
+ (WebCore::InProcessIDBServer::createIndex):
+ (WebCore::InProcessIDBServer::deleteIndex):
+ (WebCore::InProcessIDBServer::putOrAdd):
+ (WebCore::InProcessIDBServer::getRecord):
+ (WebCore::InProcessIDBServer::getCount):
+ (WebCore::InProcessIDBServer::deleteRecord):
+ (WebCore::InProcessIDBServer::openCursor):
+ (WebCore::InProcessIDBServer::iterateCursor):
+ (WebCore::InProcessIDBServer::establishTransaction):
+ (WebCore::InProcessIDBServer::fireVersionChangeEvent):
+ (WebCore::InProcessIDBServer::didStartTransaction):
+ (WebCore::InProcessIDBServer::didCloseFromServer):
+ (WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
+ (WebCore::InProcessIDBServer::databaseConnectionClosed):
+ (WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
+ (WebCore::InProcessIDBServer::didFireVersionChangeEvent):
+ (WebCore::InProcessIDBServer::openDBRequestCancelled):
+ (WebCore::InProcessIDBServer::confirmDidCloseFromServer):
+ (WebCore::InProcessIDBServer::getAllDatabaseNames):
+ (WebCore::InProcessIDBServer::didGetAllDatabaseNames):
+ * Modules/mediastream/MediaDevicesRequest.cpp:
+ (WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest):
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::constraintsValidated):
+ (WebCore::UserMediaRequest::userMediaAccessGranted):
+ * Modules/webaudio/AudioContext.cpp:
+ (WebCore::AudioContext::scheduleNodeDeletion):
+ (WebCore::AudioContext::isPlayingAudioDidChange):
+ (WebCore::AudioContext::suspend):
+ (WebCore::AudioContext::resume):
+ (WebCore::AudioContext::close):
+ (WebCore::AudioContext::suspendPlayback):
+ (WebCore::AudioContext::mayResumePlayback):
+ * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::jsFunction):
+ * dom/Node.cpp:
+ (WebCore::Node::setTextContent):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::layoutSizeChanged):
+ * inspector/CommandLineAPIHost.cpp:
+ (WebCore::CommandLineAPIHost::wrapper):
+ * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
+ (WebCore::AudioSourceProviderAVFObjC::prepare):
+ * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
+ (WebCore::WebCoreAVCFResourceLoader::invalidate):
+ * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
+ (WebCore::WebCoreAVFResourceLoader::invalidate):
+ * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+ (WebVideoFullscreenControllerContext::setExternalPlayback):
+ * platform/network/BlobResourceHandle.cpp:
+ (WebCore::BlobResourceHandle::start):
+ (WebCore::BlobResourceHandle::notifyFinish):
+ * platform/network/SocketStreamHandleBase.cpp:
+ (WebCore::SocketStreamHandleBase::disconnect):
+ * platform/network/curl/CurlDownload.cpp:
+ (WebCore::CurlDownload::didReceiveHeader):
+
2016-07-15 Chris Dumez <[email protected]>
Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -967,7 +967,7 @@
return;
}
- value->writeBlobsToDiskForIndexedDB([protectedThis = Ref<IDBTransaction>(*this), this, protectedOperation = Ref<IDBClient::TransactionOperation>(operation), keyData = IDBKeyData(key.get()).isolatedCopy(), overwriteMode](const IDBValue& idbValue) mutable {
+ value->writeBlobsToDiskForIndexedDB([protectedThis = makeRef(*this), this, protectedOperation = Ref<IDBClient::TransactionOperation>(operation), keyData = IDBKeyData(key.get()).isolatedCopy(), overwriteMode](const IDBValue& idbValue) mutable {
ASSERT(currentThread() == originThreadID());
ASSERT(isMainThread());
if (idbValue.data().data()) {
Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -91,7 +91,7 @@
void InProcessIDBServer::deleteDatabase(const IDBRequestData& requestData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData] {
m_server->deleteDatabase(requestData);
});
}
@@ -98,7 +98,7 @@
void InProcessIDBServer::didDeleteDatabase(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didDeleteDatabase(resultData);
});
}
@@ -105,7 +105,7 @@
void InProcessIDBServer::openDatabase(const IDBRequestData& requestData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData] {
m_server->openDatabase(requestData);
});
}
@@ -112,7 +112,7 @@
void InProcessIDBServer::didOpenDatabase(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didOpenDatabase(resultData);
});
}
@@ -119,7 +119,7 @@
void InProcessIDBServer::didAbortTransaction(const IDBResourceIdentifier& transactionIdentifier, const IDBError& error)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), transactionIdentifier, error] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), transactionIdentifier, error] {
m_connectionToServer->didAbortTransaction(transactionIdentifier, error);
});
}
@@ -126,7 +126,7 @@
void InProcessIDBServer::didCommitTransaction(const IDBResourceIdentifier& transactionIdentifier, const IDBError& error)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), transactionIdentifier, error] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), transactionIdentifier, error] {
m_connectionToServer->didCommitTransaction(transactionIdentifier, error);
});
}
@@ -133,7 +133,7 @@
void InProcessIDBServer::didCreateObjectStore(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didCreateObjectStore(resultData);
});
}
@@ -140,7 +140,7 @@
void InProcessIDBServer::didDeleteObjectStore(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didDeleteObjectStore(resultData);
});
}
@@ -147,7 +147,7 @@
void InProcessIDBServer::didClearObjectStore(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didClearObjectStore(resultData);
});
}
@@ -154,7 +154,7 @@
void InProcessIDBServer::didCreateIndex(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didCreateIndex(resultData);
});
}
@@ -161,7 +161,7 @@
void InProcessIDBServer::didDeleteIndex(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didDeleteIndex(resultData);
});
}
@@ -168,7 +168,7 @@
void InProcessIDBServer::didPutOrAdd(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didPutOrAdd(resultData);
});
}
@@ -175,7 +175,7 @@
void InProcessIDBServer::didGetRecord(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didGetRecord(resultData);
});
}
@@ -182,7 +182,7 @@
void InProcessIDBServer::didGetCount(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didGetCount(resultData);
});
}
@@ -189,7 +189,7 @@
void InProcessIDBServer::didDeleteRecord(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didDeleteRecord(resultData);
});
}
@@ -196,7 +196,7 @@
void InProcessIDBServer::didOpenCursor(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didOpenCursor(resultData);
});
}
@@ -203,7 +203,7 @@
void InProcessIDBServer::didIterateCursor(const IDBResultData& resultData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] {
m_connectionToServer->didIterateCursor(resultData);
});
}
@@ -210,7 +210,7 @@
void InProcessIDBServer::abortTransaction(const IDBResourceIdentifier& resourceIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resourceIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resourceIdentifier] {
m_server->abortTransaction(resourceIdentifier);
});
}
@@ -217,7 +217,7 @@
void InProcessIDBServer::commitTransaction(const IDBResourceIdentifier& resourceIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resourceIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resourceIdentifier] {
m_server->commitTransaction(resourceIdentifier);
});
}
@@ -224,7 +224,7 @@
void InProcessIDBServer::didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier, transactionIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier, transactionIdentifier] {
m_server->didFinishHandlingVersionChangeTransaction(databaseConnectionIdentifier, transactionIdentifier);
});
}
@@ -231,7 +231,7 @@
void InProcessIDBServer::createObjectStore(const IDBRequestData& resultData, const IDBObjectStoreInfo& info)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), resultData, info] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData, info] {
m_server->createObjectStore(resultData, info);
});
}
@@ -238,7 +238,7 @@
void InProcessIDBServer::deleteObjectStore(const IDBRequestData& requestData, const String& objectStoreName)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, objectStoreName] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreName] {
m_server->deleteObjectStore(requestData, objectStoreName);
});
}
@@ -245,7 +245,7 @@
void InProcessIDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, objectStoreIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier] {
m_server->clearObjectStore(requestData, objectStoreIdentifier);
});
}
@@ -252,7 +252,7 @@
void InProcessIDBServer::createIndex(const IDBRequestData& requestData, const IDBIndexInfo& info)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, info] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, info] {
m_server->createIndex(requestData, info);
});
}
@@ -259,7 +259,7 @@
void InProcessIDBServer::deleteIndex(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& indexName)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, objectStoreIdentifier, indexName] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier, indexName] {
m_server->deleteIndex(requestData, objectStoreIdentifier, indexName);
});
}
@@ -266,7 +266,7 @@
void InProcessIDBServer::putOrAdd(const IDBRequestData& requestData, const IDBKeyData& keyData, const IDBValue& value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, keyData, value, overwriteMode] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, keyData, value, overwriteMode] {
m_server->putOrAdd(requestData, keyData, value, overwriteMode);
});
}
@@ -273,7 +273,7 @@
void InProcessIDBServer::getRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, keyRangeData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, keyRangeData] {
m_server->getRecord(requestData, keyRangeData);
});
}
@@ -280,7 +280,7 @@
void InProcessIDBServer::getCount(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, keyRangeData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, keyRangeData] {
m_server->getCount(requestData, keyRangeData);
});
}
@@ -287,7 +287,7 @@
void InProcessIDBServer::deleteRecord(const IDBRequestData& requestData, const IDBKeyRangeData& keyRangeData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, keyRangeData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, keyRangeData] {
m_server->deleteRecord(requestData, keyRangeData);
});
}
@@ -294,7 +294,7 @@
void InProcessIDBServer::openCursor(const IDBRequestData& requestData, const IDBCursorInfo& info)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, info] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, info] {
m_server->openCursor(requestData, info);
});
}
@@ -301,7 +301,7 @@
void InProcessIDBServer::iterateCursor(const IDBRequestData& requestData, const IDBKeyData& key, unsigned long count)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData, key, count] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, key, count] {
m_server->iterateCursor(requestData, key, count);
});
}
@@ -308,7 +308,7 @@
void InProcessIDBServer::establishTransaction(uint64_t databaseConnectionIdentifier, const IDBTransactionInfo& info)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier, info] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier, info] {
m_server->establishTransaction(databaseConnectionIdentifier, info);
});
}
@@ -315,7 +315,7 @@
void InProcessIDBServer::fireVersionChangeEvent(IDBServer::UniqueIDBDatabaseConnection& connection, const IDBResourceIdentifier& requestIdentifier, uint64_t requestedVersion)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier = connection.identifier(), requestIdentifier, requestedVersion] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier = connection.identifier(), requestIdentifier, requestedVersion] {
m_connectionToServer->fireVersionChangeEvent(databaseConnectionIdentifier, requestIdentifier, requestedVersion);
});
}
@@ -322,7 +322,7 @@
void InProcessIDBServer::didStartTransaction(const IDBResourceIdentifier& transactionIdentifier, const IDBError& error)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), transactionIdentifier, error] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), transactionIdentifier, error] {
m_connectionToServer->didStartTransaction(transactionIdentifier, error);
});
}
@@ -329,7 +329,7 @@
void InProcessIDBServer::didCloseFromServer(IDBServer::UniqueIDBDatabaseConnection& connection, const IDBError& error)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier = connection.identifier(), error] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier = connection.identifier(), error] {
m_connectionToServer->didCloseFromServer(databaseConnectionIdentifier, error);
});
}
@@ -336,7 +336,7 @@
void InProcessIDBServer::notifyOpenDBRequestBlocked(const IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestIdentifier, oldVersion, newVersion] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestIdentifier, oldVersion, newVersion] {
m_connectionToServer->notifyOpenDBRequestBlocked(requestIdentifier, oldVersion, newVersion);
});
}
@@ -343,7 +343,7 @@
void InProcessIDBServer::databaseConnectionClosed(uint64_t databaseConnectionIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier] {
m_server->databaseConnectionClosed(databaseConnectionIdentifier);
});
}
@@ -350,7 +350,7 @@
void InProcessIDBServer::abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& transactionIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier, transactionIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier, transactionIdentifier] {
m_server->abortOpenAndUpgradeNeeded(databaseConnectionIdentifier, transactionIdentifier);
});
}
@@ -357,7 +357,7 @@
void InProcessIDBServer::didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier, requestIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier, requestIdentifier] {
m_server->didFireVersionChangeEvent(databaseConnectionIdentifier, requestIdentifier);
});
}
@@ -364,7 +364,7 @@
void InProcessIDBServer::openDBRequestCancelled(const IDBRequestData& requestData)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), requestData] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData] {
m_server->openDBRequestCancelled(requestData);
});
}
@@ -371,7 +371,7 @@
void InProcessIDBServer::confirmDidCloseFromServer(uint64_t databaseConnectionIdentifier)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), databaseConnectionIdentifier] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), databaseConnectionIdentifier] {
m_server->confirmDidCloseFromServer(databaseConnectionIdentifier);
});
}
@@ -378,7 +378,7 @@
void InProcessIDBServer::getAllDatabaseNames(const SecurityOriginData& mainFrameOrigin, const SecurityOriginData& openingOrigin, uint64_t callbackID)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), mainFrameOrigin, openingOrigin, callbackID] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), mainFrameOrigin, openingOrigin, callbackID] {
m_server->getAllDatabaseNames(m_connectionToServer->identifier(), mainFrameOrigin, openingOrigin, callbackID);
});
}
@@ -385,7 +385,7 @@
void InProcessIDBServer::didGetAllDatabaseNames(uint64_t callbackID, const Vector<String>& databaseNames)
{
- RunLoop::current().dispatch([this, protectedThis = Ref<InProcessIDBServer>(*this), callbackID, databaseNames] {
+ RunLoop::current().dispatch([this, protectedThis = makeRef(*this), callbackID, databaseNames] {
m_connectionToServer->didGetAllDatabaseNames(callbackID, databaseNames);
});
}
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -160,7 +160,7 @@
devices.append(MediaDeviceInfo::create(scriptExecutionContext(), label, id, groupId, deviceType));
}
- callOnMainThread([protectedThis = Ref<MediaDevicesRequest>(*this), devices = WTFMove(devices)]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this), devices = WTFMove(devices)]() mutable {
protectedThis->m_promise.resolve(devices);
});
m_protector = nullptr;
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -135,7 +135,7 @@
for (auto& videoTrack : videoTracks)
m_videoDeviceUIDs.append(videoTrack->persistentID());
- callOnMainThread([protectedThis = Ref<UserMediaRequest>(*this)]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this)]() mutable {
// 2 - The constraints are valid, ask the user for access to media.
if (UserMediaController* controller = protectedThis->m_controller)
controller->requestUserMediaAccess(protectedThis.get());
@@ -147,7 +147,7 @@
m_allowedVideoDeviceUID = videoDeviceUID;
m_audioDeviceUIDAllowed = audioDeviceUID;
- callOnMainThread([protectedThis = Ref<UserMediaRequest>(*this), audioDeviceUID, videoDeviceUID]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this), audioDeviceUID, videoDeviceUID]() mutable {
// 3 - the user granted access, ask platform to create the media stream descriptors.
RealtimeMediaSourceCenter::singleton().createMediaStream(protectedThis.ptr(), audioDeviceUID, videoDeviceUID);
});
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -797,7 +797,7 @@
m_isDeletionScheduled = true;
- callOnMainThread([protectedThis = Ref<AudioContext>(*this)]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this)]() mutable {
protectedThis->deleteMarkedNodes();
});
}
@@ -1001,7 +1001,7 @@
{
// Make sure to call Document::updateIsPlayingMedia() on the main thread, since
// we could be on the audio I/O thread here and the call into WebCore could block.
- callOnMainThread([protectedThis = Ref<AudioContext>(*this)] {
+ callOnMainThread([protectedThis = makeRef(*this)] {
if (protectedThis->document())
protectedThis->document()->updateIsPlayingMedia();
});
@@ -1061,7 +1061,7 @@
lazyInitialize();
- m_destinationNode->suspend([this, protectedThis = Ref<AudioContext>(*this)] {
+ m_destinationNode->suspend([this, protectedThis = makeRef(*this)] {
setState(State::Suspended);
});
}
@@ -1090,7 +1090,7 @@
lazyInitialize();
- m_destinationNode->resume([this, protectedThis = Ref<AudioContext>(*this)] {
+ m_destinationNode->resume([this, protectedThis = makeRef(*this)] {
setState(State::Running);
});
}
@@ -1111,7 +1111,7 @@
lazyInitialize();
- m_destinationNode->close([this, protectedThis = Ref<AudioContext>(*this)] {
+ m_destinationNode->close([this, protectedThis = makeRef(*this)] {
setState(State::Closed);
uninitialize();
});
@@ -1131,7 +1131,7 @@
lazyInitialize();
- m_destinationNode->suspend([this, protectedThis = Ref<AudioContext>(*this)] {
+ m_destinationNode->suspend([this, protectedThis = makeRef(*this)] {
bool interrupted = m_mediaSession->state() == PlatformMediaSession::Interrupted;
setState(interrupted ? State::Interrupted : State::Suspended);
});
@@ -1152,7 +1152,7 @@
lazyInitialize();
- m_destinationNode->resume([this, protectedThis = Ref<AudioContext>(*this)] {
+ m_destinationNode->resume([this, protectedThis = makeRef(*this)] {
setState(State::Running);
});
}
Modified: trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -154,7 +154,7 @@
void ThreadableWebSocketChannelClientWrapper::didConnect()
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this)] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this)] (ScriptExecutionContext&) {
if (m_client)
m_client->didConnect();
}));
@@ -165,7 +165,7 @@
void ThreadableWebSocketChannelClientWrapper::didReceiveMessage(const String& message)
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), message = message.isolatedCopy()] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this), message = message.isolatedCopy()] (ScriptExecutionContext&) {
if (m_client)
m_client->didReceiveMessage(message);
}));
@@ -176,7 +176,7 @@
void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(Vector<uint8_t>&& binaryData)
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), binaryData = WTFMove(binaryData)] (ScriptExecutionContext&) mutable {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this), binaryData = WTFMove(binaryData)] (ScriptExecutionContext&) mutable {
if (m_client)
m_client->didReceiveBinaryData(WTFMove(binaryData));
}));
@@ -187,7 +187,7 @@
void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned bufferedAmount)
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), bufferedAmount] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this), bufferedAmount] (ScriptExecutionContext&) {
if (m_client)
m_client->didUpdateBufferedAmount(bufferedAmount);
}));
@@ -198,7 +198,7 @@
void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake()
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this)] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this)] (ScriptExecutionContext&) {
if (m_client)
m_client->didStartClosingHandshake();
}));
@@ -209,7 +209,7 @@
void ThreadableWebSocketChannelClientWrapper::didClose(unsigned unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), unhandledBufferedAmount, closingHandshakeCompletion, code, reason = reason.isolatedCopy()] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this), unhandledBufferedAmount, closingHandshakeCompletion, code, reason = reason.isolatedCopy()] (ScriptExecutionContext&) {
if (m_client)
m_client->didClose(unhandledBufferedAmount, closingHandshakeCompletion, code, reason);
}));
@@ -220,7 +220,7 @@
void ThreadableWebSocketChannelClientWrapper::didReceiveMessageError()
{
- m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this)] (ScriptExecutionContext&) {
+ m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = makeRef(*this)] (ScriptExecutionContext&) {
if (m_client)
m_client->didReceiveMessageError();
}));
@@ -247,7 +247,7 @@
if (!m_syncMethodDone) {
// When a synchronous operation is in progress (i.e. the execution stack contains
// WorkerThreadableWebSocketChannel::waitForMethodCompletion()), we cannot invoke callbacks in this run loop.
- m_context.postTask([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this)] (ScriptExecutionContext& context) {
+ m_context.postTask([this, protectedThis = makeRef(*this)] (ScriptExecutionContext& context) {
ASSERT_UNUSED(context, context.isWorkerGlobalScope());
processPendingTasks();
});
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (203302 => 203303)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -306,7 +306,7 @@
});
});
#else
- RunLoop::main().dispatch([this, protectedThis = Ref<WebSocket>(*this)]() {
+ RunLoop::main().dispatch([this, protectedThis = makeRef(*this)]() {
dispatchOrQueueErrorEvent();
stop();
});
Modified: trunk/Source/WebCore/bindings/js/JSEventListener.h (203302 => 203303)
--- trunk/Source/WebCore/bindings/js/JSEventListener.h 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/bindings/js/JSEventListener.h 2016-07-15 21:51:07 UTC (rev 203303)
@@ -111,7 +111,7 @@
{
// initializeJSFunction can trigger code that deletes this event listener
// before we're done. It should always return 0 in this case.
- Ref<JSEventListener> protect(const_cast<JSEventListener&>(*this));
+ auto protect = makeRef(const_cast<JSEventListener&>(*this));
JSC::Strong<JSC::JSObject> wrapper(m_isolatedWorld->vm(), m_wrapper.get());
if (!m_jsFunction) {
Modified: trunk/Source/WebCore/dom/Node.cpp (203302 => 203303)
--- trunk/Source/WebCore/dom/Node.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/dom/Node.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -1480,7 +1480,7 @@
case ELEMENT_NODE:
case ATTRIBUTE_NODE:
case DOCUMENT_FRAGMENT_NODE: {
- Ref<ContainerNode> container(downcast<ContainerNode>(*this));
+ auto container = makeRef(downcast<ContainerNode>(*this));
ChildListMutationScope mutation(container);
container->removeChildren();
if (!text.isEmpty())
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (203302 => 203303)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -4016,7 +4016,7 @@
void HTMLMediaElement::layoutSizeChanged()
{
#if ENABLE(MEDIA_CONTROLS_SCRIPT)
- auto task = [this, protectedThis = Ref<Element>(*this)] {
+ auto task = [this, protectedThis = makeRef(*this)] {
if (ShadowRoot* root = userAgentShadowRoot())
root->dispatchEvent(Event::create("resize", false, false));
};
Modified: trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp (203302 => 203303)
--- trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -144,7 +144,7 @@
JSObject* prototype = JSCommandLineAPIHost::createPrototype(exec->vm(), globalObject);
Structure* structure = JSCommandLineAPIHost::createStructure(exec->vm(), globalObject, prototype);
- JSCommandLineAPIHost* commandLineAPIHost = JSCommandLineAPIHost::create(structure, globalObject, Ref<CommandLineAPIHost>(*this));
+ JSCommandLineAPIHost* commandLineAPIHost = JSCommandLineAPIHost::create(structure, globalObject, makeRef(*this));
m_wrappers.addWrapper(globalObject, commandLineAPIHost);
return commandLineAPIHost;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm (203302 => 203303)
--- trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm 2016-07-15 21:51:07 UTC (rev 203303)
@@ -323,7 +323,7 @@
memset(m_list.get(), 0, bufferListSize);
m_list->mNumberBuffers = numberOfChannels;
- callOnMainThread([protectedThis = Ref<AudioSourceProviderAVFObjC>(*this), numberOfChannels, sampleRate] {
+ callOnMainThread([protectedThis = makeRef(*this), numberOfChannels, sampleRate] {
protectedThis->m_client->setFormat(numberOfChannels, sampleRate);
});
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp (203302 => 203303)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -104,7 +104,7 @@
m_parent = nullptr;
- callOnMainThread([protectedThis = Ref<WebCoreAVCFResourceLoader>(*this)] () mutable {
+ callOnMainThread([protectedThis = makeRef(*this)] () mutable {
protectedThis->stopLoading();
});
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm (203302 => 203303)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2016-07-15 21:51:07 UTC (rev 203303)
@@ -101,7 +101,7 @@
m_parent = nullptr;
- callOnMainThread([protectedThis = Ref<WebCoreAVFResourceLoader>(*this)] () mutable {
+ callOnMainThread([protectedThis = makeRef(*this)] () mutable {
protectedThis->stopLoading();
});
}
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (203302 => 203303)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2016-07-15 21:51:07 UTC (rev 203303)
@@ -435,7 +435,7 @@
void WebVideoFullscreenControllerContext::setExternalPlayback(bool enabled, ExternalPlaybackTargetType type, String localizedDeviceName)
{
ASSERT(WebThreadIsCurrent());
- callOnMainThread([protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
+ callOnMainThread([protectedThis = makeRef(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
if (m_interface)
m_interface->setExternalPlayback(enabled, type, localizedDeviceName);
});
Modified: trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp (203302 => 203303)
--- trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -178,7 +178,7 @@
}
// Finish this async call quickly and return.
- callOnMainThread([protectedThis = Ref<BlobResourceHandle>(*this)]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this)]() mutable {
protectedThis->doStart();
});
}
@@ -652,7 +652,7 @@
// Schedule to notify the client from a standalone function because the client might dispose the handle immediately from the callback function
// while we still have BlobResourceHandle calls in the stack.
- callOnMainThread([protectedThis = Ref<BlobResourceHandle>(*this)]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this)]() mutable {
doNotifyFinish(protectedThis);
});
Modified: trunk/Source/WebCore/platform/network/SocketStreamHandleBase.cpp (203302 => 203303)
--- trunk/Source/WebCore/platform/network/SocketStreamHandleBase.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/network/SocketStreamHandleBase.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -91,7 +91,7 @@
void SocketStreamHandleBase::disconnect()
{
- Ref<SocketStreamHandle> protect(static_cast<SocketStreamHandle&>(*this)); // platformClose calls the client, which may make the handle get deallocated immediately.
+ auto protect = makeRef(static_cast<SocketStreamHandle&>(*this)); // platformClose calls the client, which may make the handle get deallocated immediately.
platformClose();
m_state = Closed;
Modified: trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp (203302 => 203303)
--- trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -403,7 +403,7 @@
if (httpCode >= 200 && httpCode < 300) {
URL url = ""
- callOnMainThread([this, url = "" protectedThis = Ref<CurlDownload>(*this)] {
+ callOnMainThread([this, url = "" protectedThis = makeRef(*this)] {
m_response.setURL(url);
m_response.setMimeType(extractMIMETypeFromMediaType(m_response.httpHeaderField(HTTPHeaderName::ContentType)));
m_response.setTextEncodingName(extractCharsetFromMediaType(m_response.httpHeaderField(HTTPHeaderName::ContentType)));
@@ -412,7 +412,7 @@
});
}
} else {
- callOnMainThread([this, header = header.isolatedCopy(), protectedThis = Ref<CurlDownload>(*this)] {
+ callOnMainThread([this, header = header.isolatedCopy(), protectedThis = makeRef(*this)] {
int splitPos = header.find(":");
if (splitPos != -1)
m_response.setHTTPHeaderField(header.left(splitPos), header.substring(splitPos + 1).stripWhiteSpace());
Modified: trunk/Source/WebKit2/ChangeLog (203302 => 203303)
--- trunk/Source/WebKit2/ChangeLog 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/ChangeLog 2016-07-15 21:51:07 UTC (rev 203303)
@@ -1,3 +1,71 @@
+2016-07-15 Geoffrey Garen <[email protected]>
+
+ Added a makeRef<T> helper
+ https://bugs.webkit.org/show_bug.cgi?id=159835
+
+ Reviewed by Andreas Kling.
+
+ Anders told me to!
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::addWorkQueueMessageReceiver):
+ (IPC::Connection::removeWorkQueueMessageReceiver):
+ (IPC::Connection::invalidate):
+ (IPC::Connection::sendMessage):
+ (IPC::Connection::processIncomingMessage):
+ (IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
+ (IPC::Connection::connectionDidClose):
+ (IPC::Connection::enqueueIncomingMessage):
+ * Platform/IPC/mac/ConnectionMac.mm:
+ (IPC::Connection::receiveSourceEventHandler):
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+ (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
+ (WebKit::ThreadedCompositor::setDeviceScaleFactor):
+ (WebKit::ThreadedCompositor::didChangeViewportSize):
+ (WebKit::ThreadedCompositor::didChangeViewportAttribute):
+ (WebKit::ThreadedCompositor::didChangeContentsSize):
+ (WebKit::ThreadedCompositor::scrollTo):
+ (WebKit::ThreadedCompositor::scrollBy):
+ (WebKit::ThreadedCompositor::didChangeVisibleRect):
+ * UIProcess/API/APIUserContentExtensionStore.cpp:
+ (API::UserContentExtensionStore::lookupContentExtension):
+ (API::UserContentExtensionStore::compileContentExtension):
+ (API::UserContentExtensionStore::removeContentExtension):
+ * UIProcess/Launcher/ProcessLauncher.cpp:
+ (WebKit::ProcessLauncher::ProcessLauncher):
+ * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
+ (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
+ * UIProcess/Storage/StorageManager.cpp:
+ (WebKit::StorageManager::createSessionStorageNamespace):
+ (WebKit::StorageManager::destroySessionStorageNamespace):
+ (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
+ (WebKit::StorageManager::cloneSessionStorageNamespace):
+ (WebKit::StorageManager::processDidCloseConnection):
+ (WebKit::StorageManager::getSessionStorageOrigins):
+ (WebKit::StorageManager::deleteSessionStorageOrigins):
+ (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
+ (WebKit::StorageManager::getLocalStorageOrigins):
+ (WebKit::StorageManager::getLocalStorageOriginDetails):
+ (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
+ (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
+ (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::fetchData):
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::pluginThreadAsyncCall):
+ * WebProcess/WebPage/EventDispatcher.cpp:
+ (WebKit::EventDispatcher::wheelEvent):
+ (WebKit::EventDispatcher::gestureEvent):
+ (WebKit::EventDispatcher::touchEvent):
+ * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
+ (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
+
2016-07-15 Chris Dumez <[email protected]>
Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (203302 => 203303)
--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -315,7 +315,7 @@
for (auto& file : fileReferences)
file->prepareForFileAccess();
- NetworkBlobRegistry::singleton().writeBlobsToTemporaryFiles(blobURLs, [this, protectedThis = Ref<NetworkConnectionToWebProcess>(*this), requestIdentifier, fileReferences = WTFMove(fileReferences)](auto& fileNames) mutable {
+ NetworkBlobRegistry::singleton().writeBlobsToTemporaryFiles(blobURLs, [this, protectedThis = makeRef(*this), requestIdentifier, fileReferences = WTFMove(fileReferences)](auto& fileNames) mutable {
for (auto& file : fileReferences)
file->revokeFileAccess();
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (203302 => 203303)
--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -529,7 +529,7 @@
if (!m_bufferedDataForCache)
return;
- NetworkCache::singleton().store(m_networkLoad->currentRequest(), m_response, WTFMove(m_bufferedDataForCache), [loader = Ref<NetworkResourceLoader>(*this)](auto& mappedBody) mutable {
+ NetworkCache::singleton().store(m_networkLoad->currentRequest(), m_response, WTFMove(m_bufferedDataForCache), [loader = makeRef(*this)](auto& mappedBody) mutable {
#if ENABLE(SHAREABLE_RESOURCE)
if (mappedBody.shareableResourceHandle.isNull())
return;
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (203302 => 203303)
--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -253,7 +253,7 @@
{
ASSERT(RunLoop::isMain());
- m_connectionQueue->dispatch([protectedThis = Ref<Connection>(*this), messageReceiverName = WTFMove(messageReceiverName), workQueue, workQueueMessageReceiver]() mutable {
+ m_connectionQueue->dispatch([protectedThis = makeRef(*this), messageReceiverName = WTFMove(messageReceiverName), workQueue, workQueueMessageReceiver]() mutable {
ASSERT(!protectedThis->m_workQueueMessageReceivers.contains(messageReceiverName));
protectedThis->m_workQueueMessageReceivers.add(messageReceiverName, std::make_pair(workQueue, workQueueMessageReceiver));
@@ -264,7 +264,7 @@
{
ASSERT(RunLoop::isMain());
- m_connectionQueue->dispatch([protectedThis = Ref<Connection>(*this), messageReceiverName = WTFMove(messageReceiverName)]() mutable {
+ m_connectionQueue->dispatch([protectedThis = makeRef(*this), messageReceiverName = WTFMove(messageReceiverName)]() mutable {
ASSERT(protectedThis->m_workQueueMessageReceivers.contains(messageReceiverName));
protectedThis->m_workQueueMessageReceivers.remove(messageReceiverName);
});
@@ -317,7 +317,7 @@
m_client = nullptr;
- m_connectionQueue->dispatch([protectedThis = Ref<Connection>(*this)]() mutable {
+ m_connectionQueue->dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->platformInvalidate();
});
}
@@ -374,7 +374,7 @@
}
// FIXME: We should add a boolean flag so we don't call this when work has already been scheduled.
- m_connectionQueue->dispatch([protectedThis = Ref<Connection>(*this)]() mutable {
+ m_connectionQueue->dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->sendOutgoingMessages();
});
return true;
@@ -647,7 +647,7 @@
StringReference messageNameReference = message->messageName();
String messageName(messageNameReference.isEmpty() ? "<unknown message>" : String(messageNameReference.data(), messageNameReference.size()));
- RunLoop::main().dispatch([protectedThis = Ref<Connection>(*this), messageReceiverName = WTFMove(messageReceiverName), messageName = WTFMove(messageName)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this), messageReceiverName = WTFMove(messageReceiverName), messageName = WTFMove(messageName)]() mutable {
protectedThis->dispatchDidReceiveInvalidMessage(messageReceiverName.utf8(), messageName.utf8());
});
return;
@@ -655,7 +655,7 @@
auto it = m_workQueueMessageReceivers.find(message->messageReceiverName());
if (it != m_workQueueMessageReceivers.end()) {
- it->value.first->dispatch([protectedThis = Ref<Connection>(*this), workQueueMessageReceiver = it->value.second, decoder = WTFMove(message)]() mutable {
+ it->value.first->dispatch([protectedThis = makeRef(*this), workQueueMessageReceiver = it->value.second, decoder = WTFMove(message)]() mutable {
protectedThis->dispatchWorkQueueMessageReceiverMessage(*workQueueMessageReceiver, *decoder);
});
return;
@@ -739,7 +739,7 @@
void Connection::postConnectionDidCloseOnConnectionWorkQueue()
{
- m_connectionQueue->dispatch([protectedThis = Ref<Connection>(*this)]() mutable {
+ m_connectionQueue->dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->connectionDidClose();
});
}
@@ -772,7 +772,7 @@
if (m_didCloseOnConnectionWorkQueueCallback)
m_didCloseOnConnectionWorkQueueCallback(this);
- RunLoop::main().dispatch([protectedThis = Ref<Connection>(*this)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this)]() mutable {
// If the connection has been explicitly invalidated before dispatchConnectionDidClose was called,
// then the client will be null here.
if (!protectedThis->m_client)
@@ -877,7 +877,7 @@
m_incomingMessages.append(WTFMove(incomingMessage));
}
- RunLoop::main().dispatch([protectedThis = Ref<Connection>(*this)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->dispatchOneMessage();
});
}
Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (203302 => 203303)
--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm 2016-07-15 21:51:07 UTC (rev 203303)
@@ -523,7 +523,7 @@
StringReference messageNameReference = decoder->messageName();
String messageName(String(messageNameReference.data(), messageNameReference.size()));
- RunLoop::main().dispatch([protectedThis = Ref<Connection>(*this), messageReceiverName = WTFMove(messageReceiverName), messageName = WTFMove(messageName)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this), messageReceiverName = WTFMove(messageReceiverName), messageName = WTFMove(messageName)]() mutable {
protectedThis->dispatchDidReceiveInvalidMessage(messageReceiverName.utf8(), messageName.utf8());
});
return;
Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (203302 => 203303)
--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -62,7 +62,7 @@
void ThreadedCompositor::setNativeSurfaceHandleForCompositing(uint64_t handle)
{
m_compositingRunLoop->stopUpdateTimer();
- m_compositingRunLoop->performTaskSync([this, protectedThis = Ref<ThreadedCompositor>(*this), handle] {
+ m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), handle] {
m_scene->setActive(!!handle);
// A new native handle can't be set without destroying the previous one first if any.
@@ -75,7 +75,7 @@
void ThreadedCompositor::setDeviceScaleFactor(float scale)
{
- m_compositingRunLoop->performTask([this, protectedThis = Ref<ThreadedCompositor>(*this), scale] {
+ m_compositingRunLoop->performTask([this, protectedThis = makeRef(*this), scale] {
m_deviceScaleFactor = scale;
scheduleDisplayImmediately();
});
@@ -83,7 +83,7 @@
void ThreadedCompositor::didChangeViewportSize(const IntSize& size)
{
- m_compositingRunLoop->performTaskSync([this, protectedThis = Ref<ThreadedCompositor>(*this), size] {
+ m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), size] {
m_viewportController->didChangeViewportSize(size);
});
}
@@ -90,7 +90,7 @@
void ThreadedCompositor::didChangeViewportAttribute(const ViewportAttributes& attr)
{
- m_compositingRunLoop->performTask([this, protectedThis = Ref<ThreadedCompositor>(*this), attr] {
+ m_compositingRunLoop->performTask([this, protectedThis = makeRef(*this), attr] {
m_viewportController->didChangeViewportAttribute(attr);
});
}
@@ -97,7 +97,7 @@
void ThreadedCompositor::didChangeContentsSize(const IntSize& size)
{
- m_compositingRunLoop->performTask([this, protectedThis = Ref<ThreadedCompositor>(*this), size] {
+ m_compositingRunLoop->performTask([this, protectedThis = makeRef(*this), size] {
m_viewportController->didChangeContentsSize(size);
});
}
@@ -104,7 +104,7 @@
void ThreadedCompositor::scrollTo(const IntPoint& position)
{
- m_compositingRunLoop->performTask([this, protectedThis = Ref<ThreadedCompositor>(*this), position] {
+ m_compositingRunLoop->performTask([this, protectedThis = makeRef(*this), position] {
m_viewportController->scrollTo(position);
});
}
@@ -111,7 +111,7 @@
void ThreadedCompositor::scrollBy(const IntSize& delta)
{
- m_compositingRunLoop->performTask([this, protectedThis = Ref<ThreadedCompositor>(*this), delta] {
+ m_compositingRunLoop->performTask([this, protectedThis = makeRef(*this), delta] {
m_viewportController->scrollBy(delta);
});
}
@@ -173,7 +173,7 @@
void ThreadedCompositor::didChangeVisibleRect()
{
- RunLoop::main().dispatch([this, protectedThis = Ref<ThreadedCompositor>(*this), visibleRect = m_viewportController->visibleContentsRect(), scale = m_viewportController->pageScaleFactor()] {
+ RunLoop::main().dispatch([this, protectedThis = makeRef(*this), visibleRect = m_viewportController->visibleContentsRect(), scale = m_viewportController->pageScaleFactor()] {
m_client->setVisibleContentsRect(visibleRect, FloatPoint::zero(), scale);
});
Modified: trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -306,7 +306,7 @@
void UserContentExtensionStore::lookupContentExtension(const WTF::String& identifier, std::function<void(RefPtr<API::UserContentExtension>, std::error_code)> completionHandler)
{
- m_readQueue->dispatch([protectedThis = Ref<Object>(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_readQueue->dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
auto path = constructedPath(storePath, identifier);
ContentExtensionMetaData metaData;
@@ -334,7 +334,7 @@
void UserContentExtensionStore::compileContentExtension(const WTF::String& identifier, WTF::String&& json, std::function<void(RefPtr<API::UserContentExtension>, std::error_code)> completionHandler)
{
- m_compileQueue->dispatch([protectedThis = Ref<Object>(*this), identifier = identifier.isolatedCopy(), json = json.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)] () mutable {
+ m_compileQueue->dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), json = json.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)] () mutable {
auto path = constructedPath(storePath, identifier);
ContentExtensionMetaData metaData;
@@ -356,7 +356,7 @@
void UserContentExtensionStore::removeContentExtension(const WTF::String& identifier, std::function<void(std::error_code)> completionHandler)
{
- m_removeQueue->dispatch([protectedThis = Ref<Object>(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_removeQueue->dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
auto path = constructedPath(storePath, identifier);
if (!WebCore::deleteFile(path)) {
Modified: trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -45,7 +45,7 @@
{
m_isLaunching = true;
- processLauncherWorkQueue().dispatch([processLauncher = Ref<ProcessLauncher>(*this)]() mutable {
+ processLauncherWorkQueue().dispatch([processLauncher = makeRef(*this)]() mutable {
processLauncher->launchProcess();
});
}
Modified: trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -52,7 +52,7 @@
// Make sure the encoding is initialized before we start dispatching things to the queue.
UTF8Encoding();
- m_queue->dispatch([protectedThis = Ref<LocalStorageDatabaseTracker>(*this)]() mutable {
+ m_queue->dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->importOriginIdentifiers();
});
}
Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -473,7 +473,7 @@
void StorageManager::createSessionStorageNamespace(uint64_t storageNamespaceID, unsigned quotaInBytes)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), storageNamespaceID, quotaInBytes]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), storageNamespaceID, quotaInBytes]() mutable {
ASSERT(!m_sessionStorageNamespaces.contains(storageNamespaceID));
m_sessionStorageNamespaces.set(storageNamespaceID, SessionStorageNamespace::create(quotaInBytes));
@@ -482,7 +482,7 @@
void StorageManager::destroySessionStorageNamespace(uint64_t storageNamespaceID)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), storageNamespaceID] {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), storageNamespaceID] {
ASSERT(m_sessionStorageNamespaces.contains(storageNamespaceID));
m_sessionStorageNamespaces.remove(storageNamespaceID);
});
@@ -490,7 +490,7 @@
void StorageManager::setAllowedSessionStorageNamespaceConnection(uint64_t storageNamespaceID, IPC::Connection* allowedConnection)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), connection = RefPtr<IPC::Connection>(allowedConnection), storageNamespaceID]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), connection = RefPtr<IPC::Connection>(allowedConnection), storageNamespaceID]() mutable {
ASSERT(m_sessionStorageNamespaces.contains(storageNamespaceID));
m_sessionStorageNamespaces.get(storageNamespaceID)->setAllowedConnection(connection.get());
@@ -499,7 +499,7 @@
void StorageManager::cloneSessionStorageNamespace(uint64_t storageNamespaceID, uint64_t newStorageNamespaceID)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), storageNamespaceID, newStorageNamespaceID] {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), storageNamespaceID, newStorageNamespaceID] {
SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID);
if (!sessionStorageNamespace) {
// FIXME: We can get into this situation if someone closes the originating page from within a
@@ -524,7 +524,7 @@
{
connection.removeWorkQueueMessageReceiver(Messages::StorageManager::messageReceiverName());
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), connection = Ref<IPC::Connection>(connection)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), connection = Ref<IPC::Connection>(connection)]() mutable {
Vector<std::pair<RefPtr<IPC::Connection>, uint64_t>> connectionAndStorageMapIDPairsToRemove;
for (auto& storageArea : m_storageAreasByConnection) {
if (storageArea.key.first != connection.ptr())
@@ -543,7 +543,7 @@
{
RefPtr<StorageManager> storageManager(this);
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable {
HashSet<RefPtr<SecurityOrigin>> origins;
for (const auto& sessionStorageNamespace : m_sessionStorageNamespaces.values()) {
@@ -559,7 +559,7 @@
void StorageManager::deleteSessionStorageOrigins(std::function<void ()>&& completionHandler)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable {
for (auto& sessionStorageNamespace : m_sessionStorageNamespaces.values())
sessionStorageNamespace->clearAllStorageAreas();
@@ -575,7 +575,7 @@
for (auto& origin : origins)
copiedOrigins.uncheckedAppend(origin->isolatedCopy());
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), copiedOrigins = WTFMove(copiedOrigins), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), copiedOrigins = WTFMove(copiedOrigins), completionHandler = WTFMove(completionHandler)]() mutable {
for (auto& origin : copiedOrigins) {
for (auto& sessionStorageNamespace : m_sessionStorageNamespaces.values())
sessionStorageNamespace->clearStorageAreasMatchingOrigin(*origin);
@@ -587,7 +587,7 @@
void StorageManager::getLocalStorageOrigins(std::function<void (HashSet<RefPtr<WebCore::SecurityOrigin>>&&)>&& completionHandler)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable {
HashSet<RefPtr<SecurityOrigin>> origins;
for (auto& origin : m_localStorageDatabaseTracker->origins())
@@ -606,7 +606,7 @@
void StorageManager::getLocalStorageOriginDetails(std::function<void (Vector<LocalStorageDatabaseTracker::OriginDetails>)>&& completionHandler)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable {
auto originDetails = m_localStorageDatabaseTracker->originDetails();
RunLoop::main().dispatch([originDetails = WTFMove(originDetails), completionHandler = WTFMove(completionHandler)]() mutable {
@@ -617,7 +617,7 @@
void StorageManager::deleteLocalStorageEntriesForOrigin(const SecurityOrigin& securityOrigin)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), copiedOrigin = securityOrigin.isolatedCopy()]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), copiedOrigin = securityOrigin.isolatedCopy()]() mutable {
for (auto& localStorageNamespace : m_localStorageNamespaces.values())
localStorageNamespace->clearStorageAreasMatchingOrigin(copiedOrigin);
@@ -630,7 +630,7 @@
void StorageManager::deleteLocalStorageOriginsModifiedSince(std::chrono::system_clock::time_point time, std::function<void ()>&& completionHandler)
{
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), time, completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), time, completionHandler = WTFMove(completionHandler)]() mutable {
auto deletedOrigins = m_localStorageDatabaseTracker->deleteDatabasesModifiedSince(time);
for (const auto& origin : deletedOrigins) {
@@ -653,7 +653,7 @@
for (auto& origin : origins)
copiedOrigins.uncheckedAppend(origin->isolatedCopy());
- m_queue->dispatch([this, protectedThis = Ref<StorageManager>(*this), copiedOrigins = WTFMove(copiedOrigins), completionHandler = WTFMove(completionHandler)]() mutable {
+ m_queue->dispatch([this, protectedThis = makeRef(*this), copiedOrigins = WTFMove(copiedOrigins), completionHandler = WTFMove(completionHandler)]() mutable {
for (auto& origin : copiedOrigins) {
for (auto& localStorageNamespace : m_localStorageNamespaces.values())
localStorageNamespace->clearStorageAreasMatchingOrigin(*origin);
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -117,7 +117,7 @@
if (!m_resourceLoadStatisticsEnabled)
return;
- m_statisticsQueue->dispatch([this, protectedThis = Ref<WebResourceLoadStatisticsStore>(*this)] {
+ m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this)] {
coreStore().clear();
auto decoder = createDecoderFromDisk("full_browsing_session");
Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (203302 => 203303)
--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -231,7 +231,7 @@
if (pendingCallbacks)
return;
- RunLoop::main().dispatch([callbackAggregator = Ref<CallbackAggregator>(*this)]() mutable {
+ RunLoop::main().dispatch([callbackAggregator = makeRef(*this)]() mutable {
WTF::Vector<WebsiteDataRecord> records;
records.reserveInitialCapacity(callbackAggregator->m_websiteDataRecords.size());
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (203302 => 203303)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -302,7 +302,7 @@
void NetscapePlugin::pluginThreadAsyncCall(void (*function)(void*), void* userData)
{
- RunLoop::main().dispatch([protectedThis = Ref<NetscapePlugin>(*this), function, userData] {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this), function, userData] {
if (!protectedThis->m_isStarted)
return;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp (203302 => 203303)
--- trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -138,7 +138,7 @@
UNUSED_PARAM(canRubberBandAtBottom);
#endif
- RunLoop::main().dispatch([protectedThis = Ref<EventDispatcher>(*this), pageID, wheelEvent]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this), pageID, wheelEvent]() mutable {
protectedThis->dispatchWheelEvent(pageID, wheelEvent);
});
}
@@ -146,7 +146,7 @@
#if ENABLE(MAC_GESTURE_EVENTS)
void EventDispatcher::gestureEvent(uint64_t pageID, const WebKit::WebGestureEvent& gestureEvent)
{
- RunLoop::main().dispatch([protectedThis = Ref<EventDispatcher>(*this), pageID, gestureEvent]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this), pageID, gestureEvent]() mutable {
protectedThis->dispatchGestureEvent(pageID, gestureEvent);
});
}
@@ -189,7 +189,7 @@
}
if (updateListWasEmpty) {
- RunLoop::main().dispatch([protectedThis = Ref<EventDispatcher>(*this)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->dispatchTouchEvents();
});
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp (203302 => 203303)
--- trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp 2016-07-15 21:35:40 UTC (rev 203302)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp 2016-07-15 21:51:07 UTC (rev 203303)
@@ -67,7 +67,7 @@
iterator->value.visibleContentRectUpdateInfo = visibleContentRectUpdateInfo;
}
if (updateListWasEmpty) {
- RunLoop::main().dispatch([protectedThis = Ref<ViewUpdateDispatcher>(*this)]() mutable {
+ RunLoop::main().dispatch([protectedThis = makeRef(*this)]() mutable {
protectedThis->dispatchVisibleContentRectUpdate();
});
}