summaryrefslogtreecommitdiffstats
path: root/base/ref_counted_memory.h
Commit message (Collapse)AuthorAgeFilesLines
* Speculative fix for crash in DOMUIThumbnailSource.erg@google.com2010-07-281-18/+9
| | | | | | | | | | | | | | | | | | | | DOMUIThumbnailSource objects are deleted on the IO thread, while they are used on the UI thread. The DataSource documentation says that they should not live on the IO thread, but for almost all DataSources, the only reference held is the one by ChromeURLDataManager, which lives on the IO thread. Since I had a racy stack where the object was being used on the UI thread while its destructor was running on the IO thread, forcing destruction on the UI thread should fix the crash. Pretty much everything but changing the templated base class of DataSource to always DeleteOnUIThread is my usual cleanup. BUG=34115 TEST=none Review URL: http://codereview.chromium.org/3061009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53873 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* First patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-3/+6
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/360042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31136 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an exception in the ref counted data. This appeares as a crash on startipbrettw@chromium.org2009-10-271-2/+7
| | | | | | | | | | | | onm my profile because I have a bookmarked favicon that exists but is empty. This makes the front() behavior of RefCountedBytes the same as RefCountedStaticMemory, and I documented this as the correct behavior. TEST=none BUG=none Review URL: http://codereview.chromium.org/333048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30205 0039d316-1c4b-4281-b951-d872f2087c98
* First fix to minimize copying of image data.erg@google.com2009-10-191-0/+76
This is the first of multiple patches that clean up handling of memory regarding images. Previously, the code did several memcpy()s or equivalents. This change: - Creates an abstract interface RefCountedMemory which provides access to the front() of a memory range and the size() of it. It is a RefCountedThreadSafe. - Adds a RefCountedStaticMemory class which isa RefCountedMemory. - Pushes RefCountedBytes up into base/ from chrome/ and make it conform to RefCountedMemory. - Have ResourceBundle return RefCountedStaticMemory to the mmaped() or DLL loaded resources instead of memcpy()ing them. - General cleanups to minimize copies in constructing RefCountedBytes. - Use the above consistent interface in the BrowserThemeProvider, along with special casing the loading of the new tab page background. This patch is mostly cleanups and there should only be a slight performance gain if any. Most of the real speedups should come in subsequent patches. BUG=http://crbug.com/24493 TEST=Slightly faster on Perf bot; does not introduce crashes. Review URL: http://codereview.chromium.org/288005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29412 0039d316-1c4b-4281-b951-d872f2087c98