[tbb-commits] [tor-browser/tor-browser-24.5.0esr-4.x-1] Bug #9701: Prevent ClipBoardCache from writing to disk.
mikeperry at torproject.org
mikeperry at torproject.org
Thu Jun 5 10:56:03 UTC 2014
commit 80fcc83fc269eb5b370700646f12cd0b099f1e3c
Author: Michael Schloh von Bennewitz <michael at schloh.com>
Date: Thu Jun 5 03:53:15 2014 -0700
Bug #9701: Prevent ClipBoardCache from writing to disk.
This disables the disk activity entirely. It seems as though there is no
reason in to write backup copies of clipboard data to disk, as the clipboard
code does not release the related memory upon disk writes anyway.
See https://trac.torproject.org/projects/tor/ticket/9701.
---
widget/xpwidgets/nsTransferable.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/widget/xpwidgets/nsTransferable.cpp b/widget/xpwidgets/nsTransferable.cpp
index 2f15f47..d94ecd9 100644
--- a/widget/xpwidgets/nsTransferable.cpp
+++ b/widget/xpwidgets/nsTransferable.cpp
@@ -58,6 +58,7 @@ DataStruct::~DataStruct()
void
DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen )
{
+#if 0 // Remove unnecessary disk caching to accommodate https://www.torproject.org/projects/torbrowser/design/#disk-avoidance
// Now, check to see if we consider the data to be "too large"
if (aDataLen > kLargeDatasetSize) {
// if so, cache it to disk instead of memory
@@ -66,6 +67,7 @@ DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen )
else
NS_WARNING("Oh no, couldn't write data to the cache file");
}
+#endif // #if 0
mData = aData;
mDataLen = aDataLen;
More information about the tbb-commits
mailing list