HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
authormikhail.pozdnyakov@intel.com <mikhail.pozdnyakov@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 May 2013 07:23:43 +0000 (07:23 +0000)
committermikhail.pozdnyakov@intel.com <mikhail.pozdnyakov@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 May 2013 07:23:43 +0000 (07:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115646

Reviewed by Darin Adler.

Source/JavaScriptCore:

* bytecompiler/StaticPropertyAnalyzer.h:
(JSC::StaticPropertyAnalyzer::putById):
    Updated accordingly to new HashMap<.., RefPtr>::get() semantics.

Source/WebCore:

No new tests, no new functionality.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::get):
(WebCore::AXObjectCache::remove):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::objectFromAXID):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::getImage):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementForAlias):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::findInsertionPointFor):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::resourceForURL):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::pauseTransitionAtTime):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateMaskLayer):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::getBlobDataFromURL):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::pluginForMIMEType):
(WebCore::PluginDatabase::MIMETypeForExtension):
* rendering/RenderCounter.cpp:
(WebCore::makeCounterNode):
(showCounterRendererTree):
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::getEffectById):
    Updated accordingly to new HashMap<.., RefPtr>::get() semantics.

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::pluginInstance):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
    Updated accordingly to new HashMap<.., RefPtr>::get() semantics.

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::hostForURL):
* Shared/ImmutableDictionary.h:
(WebKit::ImmutableDictionary::get):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
(WebKit::StorageManager::findStorageArea):
* UIProcess/WebContext.h:
(WebKit::WebContext::supplement):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::webBackForwardItem):
(WebKit::WebProcessProxy::webFrame):
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::ewkDownloadJob):
* WebProcess/Network/WebResourceLoadScheduler.h:
(WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::streamFromID):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::cancelStreamLoad):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::itemForID):
(WebKit::WebBackForwardListProxy::itemAtIndex):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::webUndoStep):
(WebKit::WebPage::didFinishCheckingText):
(WebKit::WebPage::didCancelCheckingText):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webPage):
(WebKit::WebProcess::webPageGroup):
    Updated accordingly to new HashMap<.., RefPtr>::get() semantics.

Source/WTF:

HashTraits<RefPtr<P> >::PeekType should be raw pointer so that we
can obviate multiple RefPtr copying when invoking HashMap<.., RefPtr>::get()
method.

* wtf/HashTraits.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

41 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/StaticPropertyAnalyzer.h
Source/WTF/ChangeLog
Source/WTF/wtf/HashTraits.h
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/InspectorCSSOMWrappers.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/shadow/ContentDistributor.cpp
Source/WebCore/loader/appcache/ApplicationCache.cpp
Source/WebCore/loader/archive/ArchiveResourceCollection.cpp
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/animation/CompositeAnimation.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/network/BlobRegistryImpl.cpp
Source/WebCore/plugins/PluginDatabase.cpp
Source/WebCore/rendering/RenderCounter.cpp
Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp
Source/WebKit2/Shared/ImmutableDictionary.h
Source/WebKit2/UIProcess/Storage/StorageManager.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebProcess.cpp

index 553111047ba1863f2d0d0b4654d758bc4e58cce2..63278bc5ebbb920c3ffbbc59514316f5a8f998e2 100644 (file)
@@ -1,3 +1,14 @@
+2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
+        https://bugs.webkit.org/show_bug.cgi?id=115646
+
+        Reviewed by Darin Adler.
+
+        * bytecompiler/StaticPropertyAnalyzer.h:
+        (JSC::StaticPropertyAnalyzer::putById):
+            Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
+
 2013-05-06  Julien Brianceau  <jbrianceau@nds.com>
 
         Misc bugfix and cleaning in sh4 base JIT.
index c1246b4eba59e9ff4fee3b0c716036857d39d022..dd7f0ab38a9c9f02b3d6ef4a201b79ba1a4c0d24 100644 (file)
@@ -78,7 +78,7 @@ inline void StaticPropertyAnalyzer::newObject(int dst, unsigned offsetOfInlineCa
 
 inline void StaticPropertyAnalyzer::putById(int dst, unsigned propertyIndex)
 {
-    StaticPropertyAnalysis* analysis = m_analyses.get(dst).get();
+    StaticPropertyAnalysis* analysis = m_analyses.get(dst);
     if (!analysis)
         return;
     analysis->addPropertyIndex(propertyIndex);
index 350340f8c8e6083659abf6b6373adafa156eff81..10c68e80d55f4f34b9cf180dc4441cb3a210d7bd 100644 (file)
@@ -1,3 +1,16 @@
+2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
+        https://bugs.webkit.org/show_bug.cgi?id=115646
+
+        Reviewed by Darin Adler.
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer so that we
+        can obviate multiple RefPtr copying when invoking HashMap<.., RefPtr>::get()
+        method.
+
+        * wtf/HashTraits.h:
+
 2013-05-06  Cosmin Truta  <ctruta@blackberry.com>
 
         Cherry-pick fixes to bignum from upstream
index fe4c12f60e6058309c83bbf58c357f92d939ee9c..2be33c29db1f7ad702c7dc4a04e65a6a3ad5d4b5 100644 (file)
@@ -147,8 +147,8 @@ namespace WTF {
         static PassRefPtr<P> passOut(RefPtr<P>& value) { return value.release(); }
         static PassRefPtr<P> passOut(P* value) { return value; }
 
-        // FIXME: We should consider changing PeekType to a raw pointer for better performance,
-        // but then callers won't need to call get; doing so will require updating many call sites.
+        typedef P* PeekType;
+        static PeekType peek(const RefPtr<P>& value) { return value.get(); }
     };
 
     template<> struct HashTraits<String> : SimpleClassHashTraits<String> {
index 61504135581e96b9640dc877d02f20af8622622f..835c195697baf5dc546c76801cfcc8f371509633 100644 (file)
@@ -1,3 +1,52 @@
+2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
+        https://bugs.webkit.org/show_bug.cgi?id=115646
+
+        Reviewed by Darin Adler.
+
+        No new tests, no new functionality.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::get):
+        (WebCore::AXObjectCache::remove):
+        * accessibility/AXObjectCache.h:
+        (WebCore::AXObjectCache::objectFromAXID):
+        * css/CSSImageGeneratorValue.cpp:
+        (WebCore::CSSImageGeneratorValue::getImage):
+        * css/InspectorCSSOMWrappers.cpp:
+        (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::loadPendingSVGDocuments):
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::elementForAlias):
+        * html/shadow/ContentDistributor.cpp:
+        (WebCore::ContentDistributor::findInsertionPointFor):
+        * loader/appcache/ApplicationCache.cpp:
+        (WebCore::ApplicationCache::resourceForURL):
+        * loader/archive/ArchiveResourceCollection.cpp:
+        (WebCore::ArchiveResourceCollection::archiveResourceForURL):
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::transientLocalStorage):
+        * page/animation/CompositeAnimation.cpp:
+        (WebCore::CompositeAnimation::updateTransitions):
+        (WebCore::CompositeAnimation::pauseTransitionAtTime):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::updateMaskLayer):
+        * platform/network/BlobRegistryImpl.cpp:
+        (WebCore::BlobRegistryImpl::getBlobDataFromURL):
+        * plugins/PluginDatabase.cpp:
+        (WebCore::PluginDatabase::pluginForMIMEType):
+        (WebCore::PluginDatabase::MIMETypeForExtension):
+        * rendering/RenderCounter.cpp:
+        (WebCore::makeCounterNode):
+        (showCounterRendererTree):
+        * svg/graphics/filters/SVGFilterBuilder.cpp:
+        (WebCore::SVGFilterBuilder::getEffectById):
+            Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
+
 2013-05-06  Darin Adler  <darin@apple.com>
 
         Use OwnPtr instead of deleteAllValues in KeyframeValueList
index 686cab9919001245800c63d7f84b3c75b8017186..cae58b6c513fdc17396fdf5bec24c5285d124c59 100644 (file)
@@ -195,7 +195,7 @@ AccessibilityObject* AXObjectCache::get(Widget* widget)
     if (!axID)
         return 0;
     
-    return m_objects.get(axID).get();    
+    return m_objects.get(axID);    
 }
     
 AccessibilityObject* AXObjectCache::get(RenderObject* renderer)
@@ -208,7 +208,7 @@ AccessibilityObject* AXObjectCache::get(RenderObject* renderer)
     if (!axID)
         return 0;
 
-    return m_objects.get(axID).get();    
+    return m_objects.get(axID);    
 }
 
 AccessibilityObject* AXObjectCache::get(Node* node)
@@ -231,12 +231,12 @@ AccessibilityObject* AXObjectCache::get(Node* node)
     }
 
     if (renderID)
-        return m_objects.get(renderID).get();
+        return m_objects.get(renderID);
 
     if (!nodeID)
         return 0;
 
-    return m_objects.get(nodeID).get();
+    return m_objects.get(nodeID);
 }
 
 // FIXME: This probably belongs on Node.
@@ -482,7 +482,7 @@ void AXObjectCache::remove(AXID axID)
         return;
     
     // first fetch object to operate some cleanup functions on it 
-    AccessibilityObject* obj = m_objects.get(axID).get();
+    AccessibilityObject* obj = m_objects.get(axID);
     if (!obj)
         return;
     
index 5c5598d9b6cd79ac34b8005c6276eb587ceb0a03..4811877928d6930bc7c5b3b5164e079476ee3610 100644 (file)
@@ -150,7 +150,7 @@ public:
     bool nodeIsTextControl(const Node*);
 
     AXID platformGenerateAXID() const;
-    AccessibilityObject* objectFromAXID(AXID id) const { return m_objects.get(id).get(); }
+    AccessibilityObject* objectFromAXID(AXID id) const { return m_objects.get(id); }
 
     // Text marker utilities.
     void textMarkerDataForVisiblePosition(TextMarkerData&, const VisiblePosition&);
index 91f664dd39db6daa52bab3458521308ac9fc9564..1674c7e1afd44559020855c673fc45758d576ae4 100644 (file)
@@ -100,7 +100,7 @@ Image* CSSImageGeneratorValue::getImage(RenderObject* renderer, const IntSize& s
         return 0;
 
     // Look up the image in our cache.
-    return m_images.get(size).get();
+    return m_images.get(size);
 }
 
 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> image)
index 6cb8ff1a733213d1f3197c7ede9e4042e05f2fd6..a396fb1d7f9d8a641ceacdaedc4dded31a684f55 100644 (file)
@@ -125,7 +125,7 @@ CSSStyleRule* InspectorCSSOMWrappers::getWrapperForRuleInSheets(StyleRule* rule,
 
         collectFromDocumentStyleSheetCollection(styleSheetCollection);
     }
-    return m_styleRuleToCSSOMWrapperMap.get(rule).get();
+    return m_styleRuleToCSSOMWrapperMap.get(rule);
 }
 
 } // namespace WebCore
index 274c8366ee7339e0051c8f7173b145358796ca16..4ab70bfb89649c10203996b3277efd5195f1b096 100644 (file)
@@ -3573,7 +3573,7 @@ void StyleResolver::loadPendingSVGDocuments()
         if (filterOperation->getOperationType() == FilterOperation::REFERENCE) {
             ReferenceFilterOperation* referenceFilter = static_cast<ReferenceFilterOperation*>(filterOperation.get());
 
-            WebKitCSSSVGDocumentValue* value = state.pendingSVGDocuments().get(referenceFilter).get();
+            WebKitCSSSVGDocumentValue* value = state.pendingSVGDocuments().get(referenceFilter);
             if (!value)
                 continue;
             CachedSVGDocument* cachedDocument = value->load(cachedResourceLoader);
index 0c6f577f96cd1116ee031db306b7dd19563b3b25..f0b5b5e7a4d45f0982d633b6087cff41ef5e3fb7 100644 (file)
@@ -606,7 +606,7 @@ Element* HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown() const
 {
     if (!m_hasRootEditableElementForSelectionOnMouseDown)
         return 0;
-    return rootEditableElementMap().get(this).get();
+    return rootEditableElementMap().get(this);
 }
 
 void HTMLAnchorElement::clearRootEditableElementForSelectionOnMouseDown()
index 179db5ce08b04b89e872efd299dd41ce44ea21b8..5984571955e55a37fa3e6d34660813273d7a16af 100644 (file)
@@ -619,7 +619,7 @@ HTMLFormControlElement* HTMLFormElement::elementForAlias(const AtomicString& ali
 {
     if (alias.isEmpty() || !m_elementAliases)
         return 0;
-    return m_elementAliases->get(alias.impl()).get();
+    return m_elementAliases->get(alias.impl());
 }
 
 void HTMLFormElement::addElementAlias(HTMLFormControlElement* element, const AtomicString& alias)
index 6641786995d9cf353b194ec3ef8de332159f90be..c39fe1bbf4b288c6c08d1dda4e4bef2190ff22f5 100644 (file)
@@ -162,7 +162,7 @@ ContentDistributor::~ContentDistributor()
 
 InsertionPoint* ContentDistributor::findInsertionPointFor(const Node* key) const
 {
-    return m_nodeToInsertionPoint.get(key).get();
+    return m_nodeToInsertionPoint.get(key);
 }
 
 void ContentDistributor::populate(Node* node, ContentDistribution& pool)
index 79cc9d8bdd509982dbbd59d7c58cf3d0a3969936..61829b276078cc000ff9275645c86e19b644e49b 100644 (file)
@@ -118,7 +118,7 @@ unsigned ApplicationCache::removeResource(const String& url)
 ApplicationCacheResource* ApplicationCache::resourceForURL(const String& url)
 {
     ASSERT(!KURL(ParsedURLString, url).hasFragmentIdentifier());
-    return m_resources.get(url).get();
+    return m_resources.get(url);
 }    
 
 bool ApplicationCache::requestIsHTTPOrHTTPSGet(const ResourceRequest& request)
index cdd83581be8c354c76823df7c49f6bddd9a0c9a0..aa4a870f57ad82f64afa9225a2aebb6469628bea 100644 (file)
@@ -74,7 +74,7 @@ void ArchiveResourceCollection::addResource(PassRefPtr<ArchiveResource> resource
 
 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& url)
 {
-    ArchiveResource* resource = m_subresources.get(url).get();
+    ArchiveResource* resource = m_subresources.get(url);
     if (!resource)
         return 0;
         
index c2fef23cb3ea19aa5c31e5cff25eefbf9fe31c15..46101adf15d6e282045bf4bd8979fc29dc49ef25 100644 (file)
@@ -269,7 +269,7 @@ StorageNamespace* PageGroup::transientLocalStorage(const SecurityOrigin* topOrig
     if (!m_transientLocalStorage.get(topOriginString))
         m_transientLocalStorage.set(topOriginString, StorageNamespace::sessionStorageNamespace(*this->pages().begin()));
 
-    return m_transientLocalStorage.get(topOriginString).get();
+    return m_transientLocalStorage.get(topOriginString);
 }
 
 void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
index aeff0f00ded49bc621cd04b14f64182ccd3cafa6..e7d1837e8498ecee11ac1676186d64863cce3005 100644 (file)
@@ -129,7 +129,7 @@ void CompositeAnimation::updateTransitions(RenderObject* renderer, RenderStyle*
                 RenderStyle* fromStyle = keyframeAnim ? keyframeAnim->unanimatedStyle() : currentStyle;
 
                 // See if there is a current transition for this prop
-                ImplicitAnimation* implAnim = m_transitions.get(prop).get();
+                ImplicitAnimation* implAnim = m_transitions.get(prop);
                 bool equal = true;
 
                 if (implAnim) {
@@ -521,7 +521,7 @@ bool CompositeAnimation::pauseTransitionAtTime(CSSPropertyID property, double t)
     if ((property < firstCSSProperty) || (property >= firstCSSProperty + numCSSProperties))
         return false;
 
-    ImplicitAnimation* implAnim = m_transitions.get(property).get();
+    ImplicitAnimation* implAnim = m_transitions.get(property);
     if (!implAnim) {
         // Check to see if this property is being animated via a shorthand.
         // This code is only used for testing, so performance is not critical here.
index 212e92ed78a16a4ac88bcdbabc47b0fb4c4737d7..210b81abd7221494ad7df27524fe1c39e6d37a6c 100644 (file)
@@ -1796,7 +1796,7 @@ void GraphicsLayerCA::updateMaskLayer()
     if (LayerMap* layerCloneMap = m_layerClones.get()) {
         LayerMap::const_iterator end = layerCloneMap->end();
         for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {            
-            PlatformCALayer* maskClone = maskLayerCloneMap ? maskLayerCloneMap->get(it->key).get() : 0;
+            PlatformCALayer* maskClone = maskLayerCloneMap ? maskLayerCloneMap->get(it->key) : 0;
             it->value->setMask(maskClone);
         }
     }
index 61cf39aa6704bbcb62d64f2f1fb6de156f5f7c5b..0bb65abf1b4adba36c973510dd219a68ac853e58 100644 (file)
@@ -186,7 +186,7 @@ void BlobRegistryImpl::unregisterBlobURL(const KURL& url)
 BlobStorageData* BlobRegistryImpl::getBlobDataFromURL(const KURL& url) const
 {
     ASSERT(isMainThread());
-    return m_blobs.get(url.string()).get();
+    return m_blobs.get(url.string());
 }
 
 } // namespace WebCore
index 222172685fc97795d806ff630e0aea7fa07b2981..7650b543cc995288b203a31b66875f0fb9301224 100644 (file)
@@ -198,7 +198,7 @@ PluginPackage* PluginDatabase::pluginForMIMEType(const String& mimeType)
 
     String key = mimeType.lower();
     PluginSet::const_iterator end = m_plugins.end();
-    PluginPackage* preferredPlugin = m_preferredPlugins.get(key).get();
+    PluginPackage* preferredPlugin = m_preferredPlugins.get(key);
     if (preferredPlugin
         && preferredPlugin->isEnabled()
         && preferredPlugin->mimeToDescriptions().contains(key)) {
@@ -248,7 +248,7 @@ String PluginDatabase::MIMETypeForExtension(const String& extension) const
 
         for (MIMEToExtensionsMap::const_iterator mime_it = (*it)->mimeToExtensions().begin(); mime_it != mime_end; ++mime_it) {
             mimeType = mime_it->key;
-            PluginPackage* preferredPlugin = m_preferredPlugins.get(mimeType).get();
+            PluginPackage* preferredPlugin = m_preferredPlugins.get(mimeType);
             const Vector<String>& extensions = mime_it->value;
             bool foundMapping = false;
             for (unsigned i = 0; i < extensions.size(); i++) {
index 572c9a29aeca8eb1e6ee1561c8ca65d763be7bef..d72199ecf34261d07c1b73730b68a37a90467928 100644 (file)
@@ -298,7 +298,7 @@ static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& id
 
     if (object->hasCounterNodeMap()) {
         if (CounterMap* nodeMap = counterMaps().get(object)) {
-            if (CounterNode* node = nodeMap->get(identifier).get())
+            if (CounterNode* node = nodeMap->get(identifier))
                 return node;
         }
     }
@@ -333,7 +333,7 @@ static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& id
         skipDescendants = false;
         if (!currentRenderer->hasCounterNodeMap())
             continue;
-        CounterNode* currentCounter = maps.get(currentRenderer)->get(identifier).get();
+        CounterNode* currentCounter = maps.get(currentRenderer)->get(identifier);
         if (!currentCounter)
             continue;
         skipDescendants = true;
@@ -627,7 +627,7 @@ void showCounterRendererTree(const WebCore::RenderObject* renderer, const char*
         fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n",
             current, current->node(), current->parent(), current->previousSibling(),
             current->nextSibling(), current->hasCounterNodeMap() ?
-            counterName ? WebCore::counterMaps().get(current)->get(identifier).get() : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0);
+            counterName ? WebCore::counterMaps().get(current)->get(identifier) : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0);
     }
     fflush(stderr);
 }
index 6db498d2ed41e731692c32dca4c908e20b990173..31102c9c91fed137f4d6c03948b926e8c37f9f01 100644 (file)
@@ -57,13 +57,13 @@ FilterEffect* SVGFilterBuilder::getEffectById(const AtomicString& id) const
         if (m_lastEffect)
             return m_lastEffect.get();
 
-        return m_builtinEffects.get(SourceGraphic::effectName()).get();
+        return m_builtinEffects.get(SourceGraphic::effectName());
     }
 
     if (m_builtinEffects.contains(id))
-        return m_builtinEffects.get(id).get();
+        return m_builtinEffects.get(id);
 
-    return m_namedEffects.get(id).get();
+    return m_namedEffects.get(id);
 }
 
 void SVGFilterBuilder::appendEffectToEffectReferences(PassRefPtr<FilterEffect> prpEffect, RenderObject* object)
index e90ac485b8976db90cff0060edaf07bac5073203..cec333e66ab59f3f4a5cb315e136d4099249705d 100644 (file)
@@ -1,3 +1,16 @@
+2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
+        https://bugs.webkit.org/show_bug.cgi?id=115646
+
+        Reviewed by Darin Adler.
+
+        * Plugins/Hosted/NetscapePluginHostProxy.mm:
+        (WebKit::NetscapePluginHostProxy::pluginInstance):
+        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+        (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
+            Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
+
 2013-05-04  Dean Jackson  <dino@apple.com>
 
         Animations and Transitions should not start when globally suspended
index 57d598ea6a6dc3e3be96c5fb22516cc8424ab99e..a67854c6594273ac7ba4546a77be4f041f50cba0 100644 (file)
@@ -175,7 +175,7 @@ void NetscapePluginHostProxy::removePluginInstance(NetscapePluginInstanceProxy*
 
 NetscapePluginInstanceProxy* NetscapePluginHostProxy::pluginInstance(uint32_t pluginID)
 {
-    NetscapePluginInstanceProxy* result = m_instances.get(pluginID).get();
+    NetscapePluginInstanceProxy* result = m_instances.get(pluginID);
     ASSERT(!result || result->hostProxy() == this);
     return result;
 }
index d7a05dc7e25eedbd3d7449c0113e5555534c6654..b04dd17abe4b52a444f265956e99a06c26658022 100644 (file)
@@ -361,7 +361,7 @@ bool NetscapePluginInstanceProxy::cancelStreamLoad(uint32_t streamID, NPReason r
     if (m_manualStream && streamID == 1)
         stream = m_manualStream.get();
     else
-        stream = m_streams.get(streamID).get();
+        stream = m_streams.get(streamID);
     
     if (!stream)
         return false;
index 2863810d7b9fafcc4291f5228235e1bfbcdf313f..e7bfa7cf846f47d61e2a82498373d7158fe3b481 100644 (file)
@@ -1,3 +1,49 @@
+2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
+        https://bugs.webkit.org/show_bug.cgi?id=115646
+
+        Reviewed by Darin Adler.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
+        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
+        (WebKit::NetworkResourceLoadScheduler::hostForURL):
+        * Shared/ImmutableDictionary.h:
+        (WebKit::ImmutableDictionary::get):
+        * UIProcess/Storage/StorageManager.cpp:
+        (WebKit::StorageManager::createSessionStorageMap):
+        (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
+        (WebKit::StorageManager::findStorageArea):
+        * UIProcess/WebContext.h:
+        (WebKit::WebContext::supplement):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::webBackForwardItem):
+        (WebKit::WebProcessProxy::webFrame):
+        * UIProcess/efl/DownloadManagerEfl.cpp:
+        (WebKit::DownloadManagerEfl::ewkDownloadJob):
+        * WebProcess/Network/WebResourceLoadScheduler.h:
+        (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::streamFromID):
+        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
+        (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::cancelStreamLoad):
+        * WebProcess/WebPage/EventDispatcher.cpp:
+        (WebKit::EventDispatcher::wheelEvent):
+        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+        (WebKit::WebBackForwardListProxy::itemForID):
+        (WebKit::WebBackForwardListProxy::itemAtIndex):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::webUndoStep):
+        (WebKit::WebPage::didFinishCheckingText):
+        (WebKit::WebPage::didCancelCheckingText):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::webPage):
+        (WebKit::WebProcess::webPageGroup):
+            Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
+
 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
 
         [Qt] Unreviewed buildfix after r149637.
index 3ec2f2cf500c3b1abc8c8633085097928df6c3da..24b67b76a5ad16712cec6c73277fa16c40a4f7b7 100644 (file)
@@ -167,7 +167,7 @@ void NetworkConnectionToWebProcess::startDownload(bool privateBrowsingEnabled, u
 
 void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const ResourceRequest& request, const ResourceResponse& response)
 {
-    NetworkResourceLoader* loader = m_networkResourceLoaders.get(mainResourceLoadIdentifier).get();
+    NetworkResourceLoader* loader = m_networkResourceLoaders.get(mainResourceLoadIdentifier);
     NetworkProcess::shared().downloadManager().convertHandleToDownload(downloadID, loader->handle(), request, response);
 
     // Unblock the URL connection operation queue.
index b81ec3adb1044f5a916cfcb76f156b7dfbf64801..6183055c3319489f10c1ae05f6db634059bc36f8 100644 (file)
@@ -66,7 +66,7 @@ HostRecord* NetworkResourceLoadScheduler::hostForURL(const WebCore::KURL& url, C
 
     m_hosts.checkConsistency();
     String hostName = url.host();
-    HostRecord* host = m_hosts.get(hostName).get();
+    HostRecord* host = m_hosts.get(hostName);
     if (!host && createHostPolicy == CreateIfNotFound) {
         RefPtr<HostRecord> newHost = HostRecord::create(hostName, maxRequestsInFlightPerHost);
         host = newHost.get();
index c969621e9857caef5a1731ac998dc5c87efaac29..d8d851098d72f18b45256bd08425a5b1f623830d 100644 (file)
@@ -70,7 +70,7 @@ public:
 
     APIObject* get(const String& key)
     {
-        return m_map.get(key).get();
+        return m_map.get(key);
     }
 
     PassRefPtr<ImmutableArray> keys() const;
index c65e8b76683bcc93a9de816796d63f33c6bbee71..99f87ec31d20f854ee2fd533cbc431fc8c58c21c 100644 (file)
@@ -415,7 +415,7 @@ void StorageManager::createSessionStorageMap(CoreIPC::Connection* connection, ui
     ASSERT(result.isNewEntry);
 
     ASSERT((HashMap<uint64_t, RefPtr<SessionStorageNamespace> >::isValidKey(storageNamespaceID)));
-    SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID).get();
+    SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID);
 
     // FIXME: These should be message checks.
     ASSERT(sessionStorageNamespace);
@@ -510,10 +510,10 @@ void StorageManager::setAllowedSessionStorageNamespaceConnectionInternal(uint64_
 
 void StorageManager::cloneSessionStorageNamespaceInternal(uint64_t storageNamespaceID, uint64_t newStorageNamespaceID)
 {
-    SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID).get();
+    SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID);
     ASSERT(sessionStorageNamespace);
 
-    SessionStorageNamespace* newSessionStorageNamespace = m_sessionStorageNamespaces.get(newStorageNamespaceID).get();
+    SessionStorageNamespace* newSessionStorageNamespace = m_sessionStorageNamespaces.get(newStorageNamespaceID);
     ASSERT(newSessionStorageNamespace);
 
     sessionStorageNamespace->cloneTo(*newSessionStorageNamespace);
@@ -541,7 +541,7 @@ StorageManager::StorageArea* StorageManager::findStorageArea(CoreIPC::Connection
     if (!HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::isValidKey(connectionAndStorageMapIDPair))
         return 0;
 
-    return m_storageAreasByConnection.get(connectionAndStorageMapIDPair).get();
+    return m_storageAreasByConnection.get(connectionAndStorageMapIDPair);
 }
 
 StorageManager::LocalStorageNamespace* StorageManager::getOrCreateLocalStorageNamespace(uint64_t storageNamespaceID)
index f124e8053ad9bb69df0b9ae285caf994a06ccd1f..0658ff40f959095774a72a5f214b989c25c33fbc 100644 (file)
@@ -101,7 +101,7 @@ public:
     template <typename T>
     T* supplement()
     {
-        return static_cast<T*>(m_supplements.get(T::supplementName()).get());
+        return static_cast<T*>(m_supplements.get(T::supplementName()));
     }
 
     template <typename T>
index 0dc11d74ac8b5851618e2394fb392df1c7fe055d..d43840afeb37e72d5689f0b9a66f27290861f84e 100644 (file)
@@ -210,7 +210,7 @@ Vector<WebPageProxy*> WebProcessProxy::pages() const
 
 WebBackForwardListItem* WebProcessProxy::webBackForwardItem(uint64_t itemID) const
 {
-    return m_backForwardListItemMap.get(itemID).get();
+    return m_backForwardListItemMap.get(itemID);
 }
 
 void WebProcessProxy::registerNewWebBackForwardListItem(WebBackForwardListItem* item)
@@ -463,7 +463,7 @@ WebFrameProxy* WebProcessProxy::webFrame(uint64_t frameID) const
     if (!WebFrameProxyMap::isValidKey(frameID))
         return 0;
 
-    return m_frameMap.get(frameID).get();
+    return m_frameMap.get(frameID);
 }
 
 bool WebProcessProxy::canCreateFrame(uint64_t frameID) const
index b1eb0fa1f091eec3b47f82d4da0f71152dd130e3..0ae172a71eb02555da29b8782ac45d4193f3b7e0 100644 (file)
@@ -153,7 +153,7 @@ void DownloadManagerEfl::registerDownloadJob(WKDownloadRef download, EwkView* vi
 
 EwkDownloadJob* DownloadManagerEfl::ewkDownloadJob(WKDownloadRef wkDownload)
 {
-    return m_downloadJobs.get(WKDownloadGetID(wkDownload)).get();
+    return m_downloadJobs.get(WKDownloadGetID(wkDownload));
 }
 
 void DownloadManagerEfl::unregisterDownloadJob(WKDownloadRef wkDownload)
index 686c15f2f3c390810b7bebd0e3d4f2e35f88ac4c..f1876f655cfff485c8c62c451f1c7799c2789d05 100644 (file)
@@ -58,7 +58,7 @@ public:
 
     virtual void setSerialLoadingEnabled(bool) OVERRIDE;
 
-    WebResourceLoader* webResourceLoaderForIdentifier(ResourceLoadIdentifier identifier) const { return m_webResourceLoaders.get(identifier).get(); }
+    WebResourceLoader* webResourceLoaderForIdentifier(ResourceLoadIdentifier identifier) const { return m_webResourceLoaders.get(identifier); }
 
     void networkProcessCrashed();
 
index c8c439b5700bef14a4ba9be53989c8346423e02f..39307a99612a82a05f3a5d275f562dc2b56fd39f 100644 (file)
@@ -529,7 +529,7 @@ bool NetscapePlugin::shouldLoadSrcURL()
 
 NetscapePluginStream* NetscapePlugin::streamFromID(uint64_t streamID)
 {
-    return m_streams.get(streamID).get();
+    return m_streams.get(streamID);
 }
 
 void NetscapePlugin::stopAllStreams()
index 0e9a6a443c4b3edccfa2f9db5339b945dac878c1..9a8dc435e151660df4b37ed99a0790043467d73e 100644 (file)
@@ -116,7 +116,7 @@ void PluginProcessConnectionManager::removePluginProcessConnection(PluginProcess
 void PluginProcessConnectionManager::pluginProcessCrashed(const String& pluginPath, uint32_t opaquePluginType)
 {
     MutexLocker locker(m_pathsAndConnectionsMutex);
-    CoreIPC::Connection* connection = m_pathsAndConnections.get(std::make_pair(pluginPath, static_cast<PluginProcess::Type>(opaquePluginType))).get();
+    CoreIPC::Connection* connection = m_pathsAndConnections.get(std::make_pair(pluginPath, static_cast<PluginProcess::Type>(opaquePluginType)));
 
     // It's OK for connection to be null here; it will happen if this web process doesn't know
     // anything about the plug-in process.
index 039d611cbfd26be518359c2004485dca09988745..872d43b77a13d1fb12e5720225f3cf252bc55c94 100644 (file)
@@ -1291,7 +1291,7 @@ void PluginView::cancelStreamLoad(uint64_t streamID)
 {
     // Keep a reference to the stream. Stream::cancel might remove the stream from the map, and thus
     // releasing its last reference.
-    RefPtr<Stream> stream = m_streams.get(streamID).get();
+    RefPtr<Stream> stream = m_streams.get(streamID);
     if (!stream)
         return;
 
index f19970eab955fdf26e7d189c43d479fb37124cc9..d79c2970f26bd8ff5182ef9a8629258f7dae406c 100644 (file)
@@ -88,7 +88,7 @@ void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEven
 {
 #if ENABLE(THREADED_SCROLLING)
     MutexLocker locker(m_scrollingTreesMutex);
-    if (ScrollingTree* scrollingTree = m_scrollingTrees.get(pageID).get()) {
+    if (ScrollingTree* scrollingTree = m_scrollingTrees.get(pageID)) {
         PlatformWheelEvent platformWheelEvent = platform(wheelEvent);
 
         // FIXME: It's pretty horrible that we're updating the back/forward state here.
index be82a197a736d6232a5437da9c2902eb05ca3a0b..3a13d2038e19e62252ab6ab3bfe4a69e3fcebab3 100644 (file)
@@ -115,7 +115,7 @@ static void WK2NotifyHistoryItemChanged(HistoryItem* item)
 
 HistoryItem* WebBackForwardListProxy::itemForID(uint64_t itemID)
 {
-    return idToHistoryItemMap().get(itemID).get();
+    return idToHistoryItemMap().get(itemID);
 }
 
 uint64_t WebBackForwardListProxy::idForItem(HistoryItem* item)
@@ -186,7 +186,7 @@ HistoryItem* WebBackForwardListProxy::itemAtIndex(int itemIndex)
     if (!itemID)
         return 0;
 
-    return idToHistoryItemMap().get(itemID).get();
+    return idToHistoryItemMap().get(itemID);
 }
 
 int WebBackForwardListProxy::backListCount()
index 0812e33309061682932fdaec83b449786317236b..da0690951b26cd04e0c3153f7a0dadf903a92d74 100644 (file)
@@ -2705,7 +2705,7 @@ void WebPage::mayPerformUploadDragDestinationAction()
 
 WebUndoStep* WebPage::webUndoStep(uint64_t stepID)
 {
-    return m_undoStepMap.get(stepID).get();
+    return m_undoStepMap.get(stepID);
 }
 
 void WebPage::addWebUndoStep(uint64_t stepID, WebUndoStep* entry)
@@ -3932,7 +3932,7 @@ void WebPage::addTextCheckingRequest(uint64_t requestID, PassRefPtr<TextChecking
 
 void WebPage::didFinishCheckingText(uint64_t requestID, const Vector<TextCheckingResult>& result)
 {
-    TextCheckingRequest* request = m_pendingTextCheckingRequestMap.get(requestID).get();
+    TextCheckingRequest* request = m_pendingTextCheckingRequestMap.get(requestID);
     if (!request)
         return;
 
@@ -3942,7 +3942,7 @@ void WebPage::didFinishCheckingText(uint64_t requestID, const Vector<TextCheckin
 
 void WebPage::didCancelCheckingText(uint64_t requestID)
 {
-    TextCheckingRequest* request = m_pendingTextCheckingRequestMap.get(requestID).get();
+    TextCheckingRequest* request = m_pendingTextCheckingRequestMap.get(requestID);
     if (!request)
         return;
 
index 78b20a7b9ab15956b3d56b626959ff1f08c14dd8..54cf1da537fa89c46e2f3d7841c8c30f5520bfb4 100644 (file)
@@ -543,7 +543,7 @@ WebPage* WebProcess::focusedWebPage() const
     
 WebPage* WebProcess::webPage(uint64_t pageID) const
 {
-    return m_pageMap.get(pageID).get();
+    return m_pageMap.get(pageID);
 }
 
 void WebProcess::createWebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
@@ -694,7 +694,7 @@ WebPageGroupProxy* WebProcess::webPageGroup(PageGroup* pageGroup)
 
 WebPageGroupProxy* WebProcess::webPageGroup(uint64_t pageGroupID)
 {
-    return m_pageGroupMap.get(pageGroupID).get();
+    return m_pageGroupMap.get(pageGroupID);
 }
 
 WebPageGroupProxy* WebProcess::webPageGroup(const WebPageGroupData& pageGroupData)