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

Unified Diff: Source/core/fetch/MemoryCache.cpp

Issue 346263003: Don't use the empty string as an url in MemoryCacheTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@kurlcrash_20140603
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/MemoryCache.cpp
diff --git a/Source/core/fetch/MemoryCache.cpp b/Source/core/fetch/MemoryCache.cpp
index 87792916af6506feed3ea8a57c5c78ad5c087b5b..996865d548f97a26beb7c2cb7409219fa70f97f4 100644
--- a/Source/core/fetch/MemoryCache.cpp
+++ b/Source/core/fetch/MemoryCache.cpp
@@ -109,8 +109,9 @@ KURL MemoryCache::removeFragmentIdentifierIfNeeded(const KURL& originalURL)
void MemoryCache::add(Resource* resource)
{
ASSERT(WTF::isMainThread());
+ ASSERT(resource->url().isValid());
RELEASE_ASSERT(!m_resources.contains(resource->url()));
- m_resources.set(resource->url(), MemoryCacheEntry::create(resource));
+ m_resources.set(resource->url().string(), MemoryCacheEntry::create(resource));
update(resource, 0, resource->size(), true);
WTF_LOG(ResourceLoading, "MemoryCache::add Added '%s', resource %p\n", resource->url().string().latin1().data(), resource);
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698