Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Side by Side Diff: Source/core/loader/archive/ArchiveResourceCollection.cpp

Issue 14763003: HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 ASSERT(resource); 67 ASSERT(resource);
68 if (!resource) 68 if (!resource)
69 return; 69 return;
70 70
71 const KURL& url = resource->url(); // get before passing PassRefPtr (which s ets it to 0) 71 const KURL& url = resource->url(); // get before passing PassRefPtr (which s ets it to 0)
72 m_subresources.set(url, resource); 72 m_subresources.set(url, resource);
73 } 73 }
74 74
75 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& ur l) 75 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& ur l)
76 { 76 {
77 ArchiveResource* resource = m_subresources.get(url).get(); 77 ArchiveResource* resource = m_subresources.get(url);
78 if (!resource) 78 if (!resource)
79 return 0; 79 return 0;
80 80
81 return resource; 81 return resource;
82 } 82 }
83 83
84 PassRefPtr<MHTMLArchive> ArchiveResourceCollection::popSubframeArchive(const Str ing& frameName, const KURL& url) 84 PassRefPtr<MHTMLArchive> ArchiveResourceCollection::popSubframeArchive(const Str ing& frameName, const KURL& url)
85 { 85 {
86 RefPtr<MHTMLArchive> archive = m_subframes.take(frameName); 86 RefPtr<MHTMLArchive> archive = m_subframes.take(frameName);
87 if (archive) 87 if (archive)
88 return archive.release(); 88 return archive.release();
89 89
90 return m_subframes.take(url.string()); 90 return m_subframes.take(url.string());
91 } 91 }
92 92
93 } 93 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/page/animation/CompositeAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698