Changeset 180921 in webkit
- Timestamp:
- Mar 2, 2015 10:55:37 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r180919 r180921 1 2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [WK2] Remove unnecessary create() factory functions. 4 https://bugs.webkit.org/show_bug.cgi?id=142161 5 6 Reviewed by Chris Dumez. 7 8 We can replace some create() factory functions with std::make_unique(). Because 9 it just returns new instance. Even some of those functions have used std::unique_ptr<> 10 instead of std::make_unique<>. Fixed all. 11 12 * wtf/efl/WorkQueueEfl.cpp: 13 (WorkQueue::dispatch): 14 1 15 2015-03-02 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/WTF/wtf/efl/WorkQueueEfl.cpp
r180410 r180921 58 58 return; 59 59 60 m_dispatchQueue->dispatch( WorkItem::create(this, WTF::move(function)));60 m_dispatchQueue->dispatch(std::make_unique<WorkItem>(this, WTF::move(function))); 61 61 } 62 62 -
trunk/Source/WebKit2/ChangeLog
r180912 r180921 1 2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [WK2] Remove unnecessary create() factory functions. 4 https://bugs.webkit.org/show_bug.cgi?id=142161 5 6 Reviewed by Chris Dumez. 7 8 We can replace some create() factory functions with std::make_unique(). Because 9 it just returns new instance. Even some of those functions have used std::unique_ptr<> 10 instead of std::make_unique<>. Fixed all. 11 12 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h: 13 (WebKit::SQLiteIDBTransaction::create): Deleted. 14 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: 15 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction): 16 * Platform/efl/DispatchQueueWorkItemEfl.h: 17 (WorkItem::dispatch): 18 (WorkItem::create): Deleted. 19 * UIProcess/API/gtk/PageClientImpl.h: 20 (WebKit::PageClientImpl::create): Deleted. 21 * UIProcess/API/gtk/WebKitTextChecker.h: 22 (WebKitTextChecker::create): Deleted. 23 * UIProcess/API/gtk/WebKitWebContext.cpp: 24 (webkitWebContextConstructed): 25 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 26 (webkitWebViewBaseConstructed): 27 1 28 2015-03-02 Brady Eidson <beidson@apple.com> 2 29 -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h
r163662 r180921 57 57 WTF_MAKE_NONCOPYABLE(SQLiteIDBTransaction); 58 58 public: 59 static std::unique_ptr<SQLiteIDBTransaction> create(UniqueIDBDatabaseBackingStoreSQLite& backingStore, const IDBIdentifier& transactionIdentifier, WebCore::IndexedDB::TransactionMode mode) 60 { 61 return std::unique_ptr<SQLiteIDBTransaction>(new SQLiteIDBTransaction(backingStore, transactionIdentifier, mode)); 62 } 63 59 SQLiteIDBTransaction(UniqueIDBDatabaseBackingStoreSQLite&, const IDBIdentifier& transactionIdentifier, WebCore::IndexedDB::TransactionMode); 64 60 ~SQLiteIDBTransaction(); 65 61 … … 82 78 83 79 private: 84 SQLiteIDBTransaction(UniqueIDBDatabaseBackingStoreSQLite&, const IDBIdentifier& transactionIdentifier, WebCore::IndexedDB::TransactionMode);85 86 80 void clearCursors(); 87 81 -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp
r175378 r180921 451 451 ASSERT(!RunLoop::isMain()); 452 452 453 if (!m_transactions.add(transactionIdentifier, SQLiteIDBTransaction::create(*this, transactionIdentifier, mode)).isNewEntry) {453 if (!m_transactions.add(transactionIdentifier, std::make_unique<SQLiteIDBTransaction>(*this, transactionIdentifier, mode)).isNewEntry) { 454 454 LOG_ERROR("Attempt to establish transaction identifier that already exists"); 455 455 return false; -
trunk/Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h
r180433 r180921 35 35 class WorkItem { 36 36 public: 37 static std::unique_ptr<WorkItem> create(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function)38 {39 return std::unique_ptr<WorkItem>(new WorkItem(workQueue, WTF::move(function)));40 }41 void dispatch() { m_function(); }42 43 protected:44 37 WorkItem(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function) 45 38 : m_workQueue(workQueue) … … 47 40 { 48 41 } 42 43 void dispatch() { m_function(); } 49 44 50 45 private: -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
r177440 r180921 50 50 { 51 51 public: 52 static std::unique_ptr<PageClientImpl> create(GtkWidget* viewWidget) 53 { 54 return std::unique_ptr<PageClientImpl>(new PageClientImpl(viewWidget)); 55 } 52 explicit PageClientImpl(GtkWidget*); 56 53 57 54 GtkWidget* viewWidget() { return m_viewWidget; } 58 55 59 56 private: 60 explicit PageClientImpl(GtkWidget*);61 62 57 // PageClient 63 58 virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override; -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.h
r175070 r180921 33 33 34 34 public: 35 static std::unique_ptr<WebKitTextChecker> create() 36 { 37 return std::unique_ptr<WebKitTextChecker>(new WebKitTextChecker); 38 } 35 WebKitTextChecker(); 39 36 ~WebKitTextChecker(); 40 37 … … 52 49 53 50 private: 54 WebKitTextChecker();55 56 51 std::unique_ptr<WebCore::TextCheckerEnchant> m_textChecker; 57 52 GRefPtr<GPtrArray> m_spellCheckingLanguages; -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
r178685 r180921 290 290 #endif 291 291 #if ENABLE(SPELLCHECK) 292 priv->textChecker = WebKitTextChecker::create();292 priv->textChecker = std::make_unique<WebKitTextChecker>(); 293 293 #endif 294 294 } -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r179705 r180921 502 502 503 503 WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(object)->priv; 504 priv->pageClient = PageClientImpl::create(viewWidget);504 priv->pageClient = std::make_unique<PageClientImpl>(viewWidget); 505 505 priv->authenticationDialog = 0; 506 506 }
Note: See TracChangeset
for help on using the changeset viewer.