Commit c4fdf712 authored by Michael Schloh von Bennewitz's avatar Michael Schloh von Bennewitz Committed by Mike Perry
Browse files

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.
parent 16a6d5ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;