widget/xpwidgets/nsTransferable.cpp

branch
TOR_BUG_9701
changeset 3
141e0f1194b1
parent 0
6474c204b198
child 8
97036ab72558
equal deleted inserted replaced
0:71842db4e593 1:5551497ed54d
56 56
57 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
58 void 58 void
59 DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen ) 59 DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen )
60 { 60 {
61 #if 0 // Remove unnecessary disk caching to accommodate https://www.torproject.org/projects/torbrowser/design/#disk-avoidance
62 // Now, check to see if we consider the data to be "too large" 61 // Now, check to see if we consider the data to be "too large"
63 if (aDataLen > kLargeDatasetSize) { 62 if (aDataLen > kLargeDatasetSize) {
64 // if so, cache it to disk instead of memory 63 // if so, cache it to disk instead of memory
65 if ( NS_SUCCEEDED(WriteCache(aData, aDataLen)) ) 64 if ( NS_SUCCEEDED(WriteCache(aData, aDataLen)) )
66 return; 65 return;
67 else 66 else
68 NS_WARNING("Oh no, couldn't write data to the cache file"); 67 NS_WARNING("Oh no, couldn't write data to the cache file");
69 } 68 }
70 #endif // #if 0
71 69
72 mData = aData; 70 mData = aData;
73 mDataLen = aDataLen; 71 mDataLen = aDataLen;
74 } 72 }
75 73

mercurial