[WK2] Have API::Array creation methods return Ref<>
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Apr 2015 15:28:16 +0000 (15:28 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Apr 2015 15:28:16 +0000 (15:28 +0000)
commit534fef019c42f2be4888688c82a6c25ca0e52770
treefae91336da6f4779a31272de85e8cf7ce5ae8c07
parent640fe82540cf0bb49b16311ad4377cc2e93a3799
[WK2] Have API::Array creation methods return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=143933

Reviewed by Darin Adler.

API::Array::create() and API::Array::createStringArray() should return Ref<> objects
as the return values are never null. It's up to the caller to implicitly convert the
returned objects to RefPtr<> if so required. All the call-sites have been updated to
reflect that.

* Shared/API/APIArray.cpp:
(API::Array::create):
(API::Array::createStringArray):
(API::Array::copy):
* Shared/API/APIArray.h:
* Shared/API/APIDictionary.cpp:
(API::Dictionary::keys):
* Shared/API/APIDictionary.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(ensureObjectStream):
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
(WKArrayCreateAdoptingValues):
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuCopySubmenuItems):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCopyKeys):
* Shared/API/c/WKMutableArray.cpp:
(WKMutableArrayCreate):
* Shared/Cocoa/WKNSDictionary.mm:
(-[WKNSDictionary keyEnumerator]):
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
* Shared/WebContextMenuItem.h:
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::acceptMIMETypes):
(WebKit::WebOpenPanelParameters::selectedFileNames):
* Shared/WebOpenPanelParameters.h:
* UIProcess/API/C/WKBackForwardListRef.cpp:
(WKBackForwardListCopyBackListWithLimit):
(WKBackForwardListCopyForwardListWithLimit):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCopyGuesses):
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyAcceptedMIMETypes):
(WKOpenPanelParametersCopySelectedFileNames):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageCopyRelatedPages):
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList backList]):
(-[WKBackForwardList forwardList]):
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(createWKArray):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkit_back_forward_list_get_back_list_with_limit):
(webkit_back_forward_list_get_forward_list_with_limit):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::notificationCloseCallback):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::clearNotifications):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::didGetSitesWithData):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backList):
(WebKit::WebBackForwardList::forwardList):
(WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
* UIProcess/WebGrammarDetail.cpp:
(WebKit::WebGrammarDetail::guesses):
* UIProcess/WebGrammarDetail.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindStringMatches):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
(-[WKFileUploadPanel presentWithParameters:resultListener:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame childFrames]):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemCopyChildren):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyChildFrames):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::trackedRepaintRects):
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
57 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/APIArray.cpp
Source/WebKit2/Shared/API/APIArray.h
Source/WebKit2/Shared/API/APIDictionary.cpp
Source/WebKit2/Shared/API/APIDictionary.h
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
Source/WebKit2/Shared/API/c/WKArray.cpp
Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
Source/WebKit2/Shared/API/c/WKDictionary.cpp
Source/WebKit2/Shared/API/c/WKMutableArray.cpp
Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm
Source/WebKit2/Shared/SecurityOriginData.cpp
Source/WebKit2/Shared/WebContextMenuItem.cpp
Source/WebKit2/Shared/WebContextMenuItem.h
Source/WebKit2/Shared/WebOpenPanelParameters.cpp
Source/WebKit2/Shared/WebOpenPanelParameters.h
Source/WebKit2/UIProcess/API/C/WKBackForwardListRef.cpp
Source/WebKit2/UIProcess/API/C/WKGrammarDetail.cpp
Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.mm
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitNotificationProvider.cpp
Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.cpp
Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp
Source/WebKit2/UIProcess/StatisticsRequest.cpp
Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.cpp
Source/WebKit2/UIProcess/WebBackForwardList.cpp
Source/WebKit2/UIProcess/WebBackForwardList.h
Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp
Source/WebKit2/UIProcess/WebGrammarDetail.cpp
Source/WebKit2/UIProcess/WebGrammarDetail.h
Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h