Skip to content
  • andersca@apple.com's avatar
    Simplify ImmutableArray creation · 7241adc0
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124213
    
    Reviewed by Andreas Kling.
    
    Get rid of the various ImmutableArray::adopt functions and have a single create function instead.
    Use std::move to avoid unnecessarily copying vector data.
    
    * Shared/API/c/WKArray.cpp:
    (WKArrayCreate):
    (WKArrayCreateAdoptingValues):
    * Shared/Cocoa/WKNSArray.mm:
    (-[WKNSArray copyWithZone:]):
    * Shared/ImmutableArray.cpp:
    (WebKit::ImmutableArray::create):
    (WebKit::ImmutableArray::createStringArray):
    (WebKit::ImmutableArray::ImmutableArray):
    * Shared/ImmutableArray.h:
    (WebKit::ImmutableArray::at):
    (WebKit::ImmutableArray::size):
    (WebKit::ImmutableArray::entries):
    * Shared/ImmutableDictionary.cpp:
    (WebKit::ImmutableDictionary::keys):
    * Shared/MutableArray.cpp:
    (WebKit::MutableArray::MutableArray):
    (WebKit::MutableArray::append):
    (WebKit::MutableArray::reserveCapacity):
    (WebKit::MutableArray::removeItemAtIndex):
    * Shared/SecurityOriginData.cpp:
    (WebKit::performAPICallbackWithSecurityOriginDataVector):
    * Shared/UserMessageCoders.h:
    (WebKit::UserMessageDecoder::baseDecode):
    * Shared/WebArchive.cpp:
    (WebKit::WebArchive::subresources):
    (WebKit::WebArchive::subframeArchives):
    * Shared/WebContextMenuItem.cpp:
    (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
    * UIProcess/API/C/mac/WKContextPrivateMac.mm:
    (WKContextGetInfoForInstalledPlugIns):
    * UIProcess/StatisticsRequest.cpp:
    (WebKit::StatisticsRequest::completedRequest):
    * UIProcess/WebBackForwardList.cpp:
    (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
    (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
    * UIProcess/WebContext.cpp:
    (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
    * UIProcess/WebDatabaseManagerProxy.cpp:
    (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
    (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
    * UIProcess/WebKeyValueStorageManager.cpp:
    (WebKit::didGetKeyValueStorageOrigins):
    * UIProcess/WebLoaderClient.cpp:
    (WebKit::WebLoaderClient::didChangeBackForwardList):
    * UIProcess/WebPageContextMenuClient.cpp:
    (WebKit::WebPageContextMenuClient::showContextMenu):
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::relatedPages):
    (WebKit::WebPageProxy::didFindStringMatches):
    * WebProcess/InjectedBundle/InjectedBundle.cpp:
    (WebKit::InjectedBundle::originsWithApplicationCache):
    * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
    (WebKit::InjectedBundleBackForwardListItem::children):
    * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
    (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
    * WebProcess/WebPage/WebFrame.cpp:
    (WebKit::WebFrame::childFrames):
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::trackedRepaintRects):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7241adc0